Re: Optimising "in" queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Aug 22, 2007, at 5:58 , Russell Smith wrote:

Stephen Davies wrote:
select count(rdate),rdate from reading where sensor_id in (1137,1138,1139,1140) group by rdate order by rdate desc limit 1;


It would have been helpful to see the table definition here. I can say up front that array processing in postgres is SLOW.

Um, what array processing are you seeing here? IN (a, b, b) is not an array construct.

Michael Glaesemann
grzm seespotcode net



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux