Re: [PERFORM] query from partitions

2005-12-13 Thread Simon Riggs
On Tue, 2005-12-13 at 15:59 +, Richard Huxton wrote: > Ключников А.С. wrote: > > And > > select * from base > > where id in (1,2) and datatime between '2005-05-15' and '2005-05-17'; > > 10 seconds > > > > select * from base > > where id in (select id from device where id = 1 or id = 2

Re: [PERFORM] query from partitions

2005-12-13 Thread Ключников А . С .
* Richard Huxton [2005-12-13 15:59:11 +]: > Ключников А.С. wrote: > >And > >select * from base > > where id in (1,2) and datatime between '2005-05-15' and '2005-05-17'; > >10 seconds > > > >select * from base > > where id in (select id from device where id = 1 or id = 2) and > >

Re: [PERFORM] query from partitions

2005-12-13 Thread Steinar H. Gunderson
On Tue, Dec 13, 2005 at 06:18:19PM +0300, Ключников А.С. wrote: > select * from base > where id in (select id from device where id = 1 or id = 2) and > datatime between '2005-05-15' and '2005-05-17'; > 10 minits That's a really odd way of saying "1 or 2". It probably has to go through

Re: [PERFORM] query from partitions

2005-12-13 Thread Richard Huxton
Ключников А.С. wrote: And select * from base where id in (1,2) and datatime between '2005-05-15' and '2005-05-17'; 10 seconds select * from base where id in (select id from device where id = 1 or id = 2) and datatime between '2005-05-15' and '2005-05-17'; 10 minits Why? Run

[PERFORM] query from partitions

2005-12-13 Thread Ключников А . С .
Hi. create table device(id int); insert into device values(1); insert into device values(2); . insert into device values(250); create table base ( id int, data float, datat