Subject RE: [ib-support] Plan query
Author Amrita Chaudhury
Thanks SET ! !
That made a difference .
Cascadeid is used to map indexes to names and contains a small mapping of
incides to their names as it should be
diplayed to the user.
What does " most restricting " mean though ? It has the highest selectivity
( ie only one record per index pair) than
the other tables which have hourly and daily data for each index pair.

Would it not help th have those tables first in the join plan ?

TIA!
amrita .

-----Original Message-----
From: Svein Erling Tysvær [mailto:svein.erling.tysvaer@...]
Sent: Monday, June 24, 2002 4:34 AM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Plan query


Amrita,
I guess the main improvement to your query would be to use EXISTS rather
than IN, e.g. change

TRAF_ORG.SECTOR IN (SELECT INDEXLIST FROM GETSELECTEDINDEX(:SECTORV , 3))

to

EXISTS(SELECT 1 FROM GETSELECTEDINDEX(:SECTORV , 3) WHERE INDEXLIST =
TRAF_ORG.SECTOR)

and do the same for FA.

Another thing that I do not understand is why you join on that many fields.
Have you considered storing BSC, BTS, SECTOR, FA, PMDATE and PMHOUR in a
separate table and then just store the primary key of this new table in
TRAF_TER and TRAF_ORG? Don't think it will make much of a difference though.

I don't see what cascadeid is doing in this procedure at all and don't see
why you want it to execute last (in general, it is a good idea to have the
most restricting table first in the query plan).

Set

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]