Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLJNR-0004qt-2r for pgsql-performance@postgresql.org; Mon, 08 Oct 2012 19:52:33 +0000 Received: from relaygateway01.edpnet.net ([212.71.1.210]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLJNP-0008D5-8b for pgsql-performance@postgresql.org; Mon, 08 Oct 2012 19:52:32 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqQBAGItc1DV26Wk/2dsb2JhbAANOLtthmoBAQEDATg4DgsLGAklDwIcKhMIAQGHe6ZOij6JCItPgm+DIQOpCA X-IronPort-AV: E=Sophos;i="4.80,555,1344204000"; d="scan'208";a="117838735" Received: from 213.219.165.164.bro01.dyn.edpnet.net (HELO [192.168.0.10]) ([213.219.165.164]) by relaygateway01.edpnet.net with ESMTP; 08 Oct 2012 21:52:29 +0200 Message-ID: <50732EFD.80608@ulb.ac.be> Date: Mon, 08 Oct 2012 21:52:29 +0200 From: Julien Cigar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120909 Thunderbird/15.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Scaling 10 million records in PostgreSQL table References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/53 X-Sequence-Number: 48012 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 exception error. > > query is : > select count(*) from dealer_vehicle_details where modified_on between '2012-10-01' and '2012-10-08' and dealer_id=270001; please show us an EXPLAIN ANALYZE of the query > After a lot of time it responds 1184 as count > > what are the ways i have to follow to increase the performance of this query? > > The insertion also going parallel since the daily realtime updation. > > what could be the reason exactly for this lacking performace? missing index, wrong configuration, ... please also note that, generally, all those "cloud stuff" have generally very poor I/O performance .. > >