Subject | Re: Query optimization |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-10-06T14:40:12Z |
My turn to say I'm sorry, I didn't read the mail where you said you
had no other indexes until just now. The 2=0 can only help in reducing
the number of indexes, it doesn't add any.
One further question. How many of the MSISDNs start '6'? If there is a
lot of them, you could add 2=0, and get
PLAN (OC2 INDEX (IDX_OPPORTUNITY_CALLS))
PLAN (OC NATURAL)
Also, an index on the date (combined with INTERACT_ID) may be useful
if your date span is very small when you run your query (but then you
may need the 2=0 for OC2).
Set
had no other indexes until just now. The 2=0 can only help in reducing
the number of indexes, it doesn't add any.
One further question. How many of the MSISDNs start '6'? If there is a
lot of them, you could add 2=0, and get
PLAN (OC2 INDEX (IDX_OPPORTUNITY_CALLS))
PLAN (OC NATURAL)
Also, an index on the date (combined with INTERACT_ID) may be useful
if your date span is very small when you run your query (but then you
may need the 2=0 for OC2).
Set
--- In firebird-support@yahoogroups.com, "zimrilin2000" wrote:
> Sorry, this is the query PLAN
>
> PLAN (OC2 INDEX (IDX_OPPORTUNITY_CALLS))
> PLAN (OC INDEX (IDX_OPPORTUNITY_CALLS))
>
> Still the same query PLAN if I add 2=0 (it is already using the
> index)
>
> The table has 5279698 rows and 1937943 distinct MSISDN
>
> Diego