[PERFORM] Performance of query

2013-03-22 Thread Cindy Makarowsky
I have two tables in Postgres 9.2 on a Linux server with 8GB of RAM. The first table has 60 million records: CREATE TABLE table1 ( id integer, update date, company character(35), address character(35), city character(20), state character(2), zip character(9), phone character(10),

Re: [PERFORM] Performance of query

2013-03-22 Thread Cindy Makarowsky
But, I do have an index on Table1 on the state field which is in my group by condition: CREATE INDEX statidx2 ON table1 USING btree (state COLLATE pg_catalog.default ); I have vacuumed the table too. On Fri, Mar 22, 2013 at 5:13 PM, Josh Berkus j...@agliodbs.com wrote: On 03/22/2013

Re: [PERFORM] Performance of query

2013-03-22 Thread Misa Simic
Hi, there is something mixed.. your index is on table1 Explain Analyze reports about table called: busbase Kind Regards, Misa 2013/3/22 Cindy Makarowsky cindymakarow...@gmail.com But, I do have an index on Table1 on the state field which is in my group by condition: CREATE

Re: [PERFORM] Performance of query

2013-03-22 Thread Cindy Makarowsky
I changed the name of the table for the post but forgot to change it in the results of the explain. Table1 is busbase. On Fri, Mar 22, 2013 at 6:25 PM, Misa Simic misa.si...@gmail.com wrote: Hi, there is something mixed.. your index is on table1 Explain Analyze reports about table

Re: [PERFORM] Index usage for tstzrange?

2013-03-22 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: We should do this automatically. Or am I missing something? Yes. This is not equality. ALTER OPERATOR FAMILY integer_ops USING btree ADD OPERATOR 3 @ (int4, int4range), FUNCTION 1 btint4rangecmp(int4, int4range); That will break