RE: index
Posted in 2003
Topics: Performance & Tuning, Clustering, Grid & MACH11
UPDATE STATISTICS? Just a guess.... ;-)
G
hello group
this is my select :
distretto and numero is not primary key
select * from tt_master where distretto=0444 and numero=00563921
----------------------------------------------------------------------------
-------------------i have created the this index :
CREATE index ttmaster3 ON tt_master
(
distretto,numero
)
in dbdati3
result:
index name Owner Type Cluster Columns
ttmaster3 olbb dupls No distretto
numero
----------------------------------------------------------------------------
--
when i do the explain plain result this is:
QUERY:
------
select * from tt_master where distretto=0444 and numero=00563921
Estimated Cost: 36484
Estimated # of Rows Returned: 1
1) olbb.tt_master: SEQUENTIAL SCAN
Filters: (olbb.tt_master.distretto = 444 AND olbb.tt_master.numero = 563921
)
why ?????
tanks
**********************************************************************************
This message is sent in strict confidence for the addressee only. It may
contain legally privileged information. The contents are not to be disclosed
to anyone other than the addressee. Unauthorised recipients are requested
to preserve this confidentiality and to advise the sender immediately of any
error in transmission.
This footnote also confirms that this email message has been swept for the
presence of computer viruses, however we cannot guarantee that this message
is free from such problems.
**********************************************************************************
If both fields are defined as char use quotes around values.
Otherwise you are forcing conversion for every row.
(BTW. Oracle for example refuses to execute a statement like that...)
HTH
Michael
Roff, Geoff wrote:
>UPDATE STATISTICS? Just a guess.... ;-)>
>G
>
>hello group
>
>this is my select :
>distretto and numero is not primary key
>
>select * from tt_master where distretto=0444 and numero=00563921
>----------------------------------------------------------------------------
>------------------->i have created the this index :
>
>CREATE index ttmaster3 ON tt_master
>(
>distretto,>numero
>)
>in dbdati3
>
>result:
>
>index name Owner Type Cluster Columns
>
>ttmaster3 olbb dupls No distretto
> numero
>
>----------------------------------------------------------------------------
>--
>when i do the explain plain result this is:
>
>QUERY:
>------
>select * from tt_master where distretto=0444 and numero=00563921>
>Estimated Cost: 36484
>Estimated # of Rows Returned: 1
>
>1) olbb.tt_master: SEQUENTIAL SCAN
>
> Filters: (olbb.tt_master.distretto = 444 AND olbb.tt_master.numero = 563921
>)
>
>
>why ?????
>
>
>tanks
>
>**********************************************************************************
>This message is sent in strict confidence for the addressee only. It may
>contain legally privileged information. The contents are not to be disclosed
>to anyone other than the addressee. Unauthorised recipients are requested
>to preserve this confidentiality and to advise the sender immediately of any
>error in transmission.
>This footnote also confirms that this email message has been swept for the
>presence of computer viruses, however we cannot guarantee that this message
>is free from such problems.
>**********************************************************************************
>
>