I found myself in a pretty pickle. I have tables from only one column (lists of restrictions or inclusion) that are more or less varchar (25), but the fact is that I will not have time to index them before using them in the main query and, depending on how important this is, I donโt know how many rows in each table. The base table at the heart of all this is about 1.4 million rows and about 50 columns.
My assumptions are as follows:
IN is not recommended in cases where many values โโ(strings) are returned, because it looks, although the values โโare sequential, right? (IN in the subquery did not pass the value directly)
Combining (INNER to enable and LEFT and checking for Nulls when suppressing) are best for large data sets (more than 1k rows or so for mach to)
EXISTS has always interested me because it seems to perform a subquery for each row (all 1.4 million? Yikes.)
In my hint, if possible, get the suppression table score and use either IN (for rows under 1k) or INNER / LEFT Join (for suppression tables above 1k rows). Note, and the field that I will suppress will be the index in the large base table, but the suppression table will not. Thoughts?
Thanks in advance for any comments and / or advice.
user418754
source share