|
-
Jeff,
thanks so much for your help as always but I have another question I need to ask you. It does use the index instead of doing a full table scan;however, the cost is really high by looking at the explain plan.
BUT if I am running this query I have much better cost then the above query.
SELECT /*+ INDEX(A GRID_MASTER_SDX)*/ a.grid_lvl2_code, b.grid_lvl3_code
FROM grid_county_centroid B,grid_master A
WHERE sdo_relate(B.centroid,A.sob_geometry, 'mask=anyinteract querytype=join') = 'TRUE'
and a.grid_lvl = 2 and a.grid_lvl2_code like 'WY%' and b.grid_lvl = 3
the only thing different is I add two more conditions
and a.grid_lvl2_code like 'WY%' and b.grid_lvl = 3
why the cost is much better when I at this level ??? Could you please give some explainanation of how to reduce the cost on the first query???
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|