Re: [PERFORM] Performance of query

2013-03-25 Thread Cindy Makarowsky
I basically don't have any control over the generated select statement. I'm using Mondrian and that is the select statement that gets passed to Postgres. You're right that if you remove the count(id), the query is faster but I can't do that since the select statement is being executed from

[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
:46 PM, Cindy Makarowsky wrote: I've tried playing around with the settings in the config file for shared_buffers, work_mem, etc restarting Postgres each time and nothing seems to help. Well, you're summarizing 55 million rows on an unindexed table: - Seq Scan on busbase (cost=0.00

Re: [PERFORM] Performance of query

2013-03-22 Thread Cindy Makarowsky
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 INDEX statidx2 ON table1 USING btree (state COLLATE pg_catalog.default ); I have vacuumed