Re: Problem with the group statement...

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Wed, 17 Jul 2002 18:08:40 +0200
Message-ID: <ah44q8$pk9$1_at_dackel.pdb.sbs.de>


"Steve Kass" <skass_at_drew.edu> wrote in message news:3D345035.30D3469_at_drew.edu...
> Maybe something like this?
>
> select TID, PN, PP, ED from x as X1
> where not exists (
> select * from x
> where (TID, PP, ED) > (X1.TID,X1.PP,X1.ED)
> and PN = X1.PN
> )
Could maybe work, but mysql doesn't permit nested selects yet. So I did put a cache table in the database, which gets filled with a REPLACE ... SELECT statement. Indexing makes REPLACE replace and insert all the stuff I need in the time I need. (Archive of 4 million prices, cache with 36000 different "current" prices, updating the cache with 1000 new prices in just under 1s. Since the real load is more in the low 100000's, I'm way under the (soft) deadline of 3s for one entered price.)

Greetings and thanks for all!
Volker Received on Wed Jul 17 2002 - 18:08:40 CEST

Original text of this message