Re: [GENERAL] Help with join syntax sought supplemental

2009-05-21 Thread James B. Byrne
On Thu, May 21, 2009 06:02, Alban Hertroys wrote: > > But as people often say here, premature optimisation is a waste of > time, so don't go that route unless you have a reason to expect > problems in that area. > That was my very thought when I sent that message. On the other hand, in case I w

Re: [GENERAL] Help with join syntax sought supplemental

2009-05-21 Thread Alban Hertroys
On May 20, 2009, at 7:17 PM, James B. Byrne wrote: Looking at this I have to wonder what will be the effect of having tens of thousands of rate-pairs on file. Would this query be improved by first doing a sub-query on base/quote pairs that returned DISTINCT pairs and then do the IN condition usi

Re: [GENERAL] Help with join syntax sought supplemental

2009-05-20 Thread Andy Colson
James B. Byrne wrote: On Wed, May 20, 2009 13:07, James B. Byrne wrote: This seems to be working. I had to take a different approach as I had misapprehended GROUP BY completely. SELECT * FROM currency_exchange_rates AS xchg1 WHERE id IN ( SELECT id FROM currency_exchange_rates as xc

Re: [GENERAL] Help with join syntax sought supplemental

2009-05-20 Thread James B. Byrne
On Wed, May 20, 2009 13:07, James B. Byrne wrote: > This seems to be working. I had to take a different approach as I > had misapprehended GROUP BY completely. > > > SELECT * > FROM currency_exchange_rates AS xchg1 > WHERE id > IN ( > SELECT id > FROM currency_exchange_rates as xchg2 >