02-10-2016 03:29 PM
Is there an efficient way to exploit an index (45k unique) using a list of ~1k values without entering them into the WHERE? Is there some method of loading the list into a hash and pulling it into the where instead of into a subsetting if?
02-10-2016 03:54 PM
02-10-2016 04:28 PM
I guess another way to state "Is there a way to exploit an index outside of a WHERE"?
I'm not finding anything.
Background is that we need 6 tables (and counting...) attached to a table with 1.9 billion rows on a persistent basis. A full table scan is not an option, and SQL gets messy really quickly. There is an indexed field in common with one of the attached tables that needs to be filtered on.
The best I can think of is what you said, to populate a macro variable and load that into the WHERE.
02-10-2016 05:22 PM