|
|
Archives of the TeradataForum
Message Posted: Mon, 19 Jan 2004 @ 13:52:30 GMT
Subj: | | Re: Query Optimization with Inner Joins |
|
From: | | Geoffrey Rommel |
| Can someone help me out in optimizing a select query which inner joins two table one big and another small? | |
| Table y has primary index on a,b,e,f,g,h ... | |
| I am joining on a and b column. | |
Your EXPLAIN text shows "no confidence" and "low confidence", which means you need statistics. Change the primary index on table y (the
little one) to (a,b). It may be a little skewed, but don't worry about that. Collect statistics on ALL columns and indexes in that table; collect
them on all indexes and join columns in the larger one. Then test again. This should make a difference.
| |