Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-09 Thread Daniel Farina
On Mon, Oct 8, 2012 at 1:25 PM, Navaneethan R wrote: > On Tuesday, October 9, 2012 1:40:08 AM UTC+5:30, Steve Crawford wrote: >> On 10/08/2012 08:26 AM, Navaneethan R wrote: >> >> > Hi all, >> >> > >> >> >I have 10 million records in my postgres table.I am running the >> > database in ama

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-09 Thread Navaneethan R
On Tuesday, October 9, 2012 1:40:08 AM UTC+5:30, Steve Crawford wrote: > On 10/08/2012 08:26 AM, Navaneethan R wrote: > > > Hi all, > > > > > >I have 10 million records in my postgres table.I am running the > > database in amazon ec2 medium instance. I need to access the last week data

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-09 Thread Samuel Gendler
On Mon, Oct 8, 2012 at 1:25 PM, Navaneethan R wrote: > >After created the index for WHERE clause "WHERE dealer_id = 270001"..It > is performing better.I have more dealer ids Should I do it for each > dealer_id? > > All you've really done is confuse the issue. Please read the wiki page on how

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-08 Thread Samuel Gendler
On Mon, Oct 8, 2012 at 1:27 PM, Craig Ringer wrote: > > If you already have appropriate indexes and have used `explain analyze` to > verify that the query isn't doing anything slow and expensive, it's > possible the easiest way to improve performance is to set up async > replication or log shippi

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-08 Thread Craig Ringer
On 10/08/2012 11:26 PM, Navaneethan R wrote: Hi all, I have 10 million records in my postgres table.I am running the database in amazon ec2 medium instance. EC2 usually means "My I/O performance is terrible" and "medium instance" means "I don't have enough RAM for caching to make up f

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-08 Thread Steve Crawford
On 10/08/2012 08:26 AM, Navaneethan R wrote: Hi all, I have 10 million records in my postgres table.I am running the database in amazon ec2 medium instance. I need to access the last week data from the table. It takes huge time to process the simple query.So, i throws time out exception

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-08 Thread Larry Rosenman
On 2012-10-08 10:26, Navaneethan R wrote: Hi all, I have 10 million records in my postgres table.I am running the database in amazon ec2 medium instance. I need to access the last week data from the table. It takes huge time to process the simple query.So, i throws time out exception err

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-08 Thread Julien Cigar
On 10/08/2012 17:26, Navaneethan R wrote: Hi all, Hello, I have 10 million records in my postgres table.I am running the database in amazon ec2 medium instance. I need to access the last week data from the table. It takes huge time to process the simple query.So, i throws time out ex

Re: [PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-08 Thread Merlin Moncure
On Mon, Oct 8, 2012 at 10:26 AM, Navaneethan R wrote: > Hi all, > > I have 10 million records in my postgres table.I am running the > database in amazon ec2 medium instance. I need to access the last week data > from the table. > It takes huge time to process the simple query.So, i throws

[PERFORM] Scaling 10 million records in PostgreSQL table

2012-10-08 Thread Navaneethan R
Hi all, I have 10 million records in my postgres table.I am running the database in amazon ec2 medium instance. I need to access the last week data from the table. It takes huge time to process the simple query.So, i throws time out exception error. query is : select count(*) from d