I always pre-select, too, but I often do it in two steps. Pre-select query #1 is the simplest, fastest SQL which eliminates the obvious 99% of data not needed for this answer. The second refines the raw results into the precise ones. I find that two queries like this can run in 2-3 seconds, where a single SQL statement to get the precise results can take 5x the time. Plus, the two statements are easier to write!
FWIW, Ken On Mon, Jan 19, 2015 at 7:13 PM, Gene Wirchenko <[email protected]> wrote: > At 13:39 2015-01-16, Stephen Russell <[email protected]> wrote: > > [snip] > > I can select the raw rows in a Select * from Where t_yer = 2014 and get >> them in just over 2 min. >> >> Or I Pre-Sum the bastards with a group by and only bring back 48 thousand >> rows in 20 seconds. >> > > Yes, I preprocess. Why grovel through more data than needed? > > Sincerely, > > Gene Wirchenko > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAFyV=lnr03t1u+d1ui+c5maxh_fgzck4czwdtumphdwrg0w...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

