[SOLVED] Re: [GENERAL] Timestamp indicies not being used!

2009-07-19 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First of all *thank* you very much to all that replied! :) Sam's suggestion actually did the trick! I created the multi-column index and the stalling went away. Yay! Best regards, Pedro Doria Meunier GSM: +351 96 17 20 188 Skype: pdoriam Tom L

Re: [GENERAL] Timestamp indicies not being used!

2009-07-19 Thread Tom Lane
Andreas Kretschmer writes: > Sam Mason wrote: >> Based on your query, I think you want a multi-column index---probably on >> (id,zulu_timestamp). >> >> The problem with just having an index on either column is that it's >> difficult to combine them and PG hence just thinks that it will be > Sin

Re: [GENERAL] Timestamp indicies not being used!

2009-07-19 Thread Sam Mason
On Sun, Jul 19, 2009 at 02:56:04PM +0200, Andreas Kretschmer wrote: > Sam Mason wrote: > > The problem with just having an index on either column is that it's > > difficult to combine them and PG hence just thinks that it will be > > Since 8.1 PG can do an bitmap index scan using both indexes...

Re: [GENERAL] Timestamp indicies not being used!

2009-07-19 Thread Andreas Kretschmer
Sam Mason wrote: > On Sun, Jul 19, 2009 at 11:15:39AM +0100, Pedro Doria Meunier wrote: > > I have a table ~18M rows with a 'timestamp with time zone' column. It's > > indexed thus: > > > > CREATE INDEX my_table_timestamp_idx > > ON my_table > > USING btree > > (zulu_timestamp); > > Based

Re: [GENERAL] Timestamp indicies not being used!

2009-07-19 Thread Sam Mason
On Sun, Jul 19, 2009 at 11:15:39AM +0100, Pedro Doria Meunier wrote: > I have a table ~18M rows with a 'timestamp with time zone' column. It's > indexed thus: > > CREATE INDEX my_table_timestamp_idx > ON my_table > USING btree > (zulu_timestamp); Based on your query, I think you want a mult

Re: [GENERAL] Timestamp indicies not being used!

2009-07-19 Thread Andreas Kretschmer
Pedro Doria Meunier wrote: > Hi All, > > I *really* need some help with this one... > > I have a table ~18M rows with a 'timestamp with time zone' column. It's > indexed thus: > > CREATE INDEX my_table_timestamp_idx > ON my_table > USING btree > (zulu_timestamp); > > whenever I issue a

[GENERAL] Timestamp indicies not being used!

2009-07-19 Thread Pedro Doria Meunier
Hi All, I *really* need some help with this one... I have a table ~18M rows with a 'timestamp with time zone' column. It's indexed thus: CREATE INDEX my_table_timestamp_idx ON my_table USING btree (zulu_timestamp); whenever I issue a command like: SELECT speed, digital_input_1, digital_in