• If address type only has two values, in over 1-million rows, then indexing it isn't useful. You'd probably be better off partitioning the table into two tables, one for ME, one for MA. That should simplify what you do significantly.

    Second, judging by what the sample queries are doing, unless you are running these over and over and over again, every few minutes/seconds, I don't know that they actually need indexes.

    It sure sounds like a daily process thus far, and even without indexes, a million or so rows run once per query per day isn't something that really needs indexes. How often do you run these queries to put the data in your report table?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon