Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id A678A2E0099 for ; Mon, 26 May 2008 21:08:14 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 62053-01 for ; Mon, 26 May 2008 21:06:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.emproshunts.com (mail.emproshunts.com [66.64.191.19]) by developer.postgresql.org (Postfix) with ESMTP id 32E982E004A for ; Mon, 26 May 2008 21:05:27 -0300 (ADT) Received: from [192.168.1.49] by mail.emproshunts.com (GMS 15.00.3626/KX5895.00.ca7cb0e7) with ESMTP id rfmqhaaa for pgsql-general@postgresql.org; Mon, 26 May 2008 20:05:25 -0400 Message-ID: <483B5040.30600@emproshunts.com> Date: Mon, 26 May 2008 20:05:20 -0400 From: Justin User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: mark , pgsql-general@postgresql.org Subject: Re: select query takes 13 seconds to run with index References: <82fa9e310805261549m2362fbe8sbf18789938fee833@mail.gmail.com> <483B4729.7050402@emproshunts.com> <82fa9e310805261632y46f306fdh84e2da62ffbd7873@mail.gmail.com> <483B4C74.7000703@emproshunts.com> <82fa9e310805261657u4a84b5fftd3abb50314f18815@mail.gmail.com> In-Reply-To: <82fa9e310805261657u4a84b5fftd3abb50314f18815@mail.gmail.com> Content-Type: multipart/alternative; boundary="------------030005060001050204010003" X-Originating-IP: [192.168.1.49] X-DNSBL: 0 X-AntiSpam: Checked for restricted content by Gordano's AntiSpam Software X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/956 X-Sequence-Number: 133355 This is a multi-part message in MIME format. --------------030005060001050204010003 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit mark wrote: >> >> >> >> Size of the Table >> >> >> 22 million rows approximately >> >> >> I have no experience on large datasets so people with more experience in >> this area are going to have to chime in. >> My gut feel is 13 seconds for Postgresql to sort through an index of that >> size and table is not bad. >> >> you may need to take a look at hardware and postgresql.config settings to >> improve the performance for this query >> >> This query is very simple where changing it around or adding index results >> massive improvements is not going to help in this case. >> > the hardware is e5405 dual quad core on a 16GB RAM machine, with 8.3.1 > default settings except maximum connections increased... > That could be problem, Postgresql default settings are very conservative. You need to read http://www.postgresqldocs.org/wiki/Performance_Optimization and tune posgtresql.config settings. What OS are you running? What is Disk Subsystem setup??? --------------030005060001050204010003 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit mark wrote:



Size of the Table


22 million rows approximately


I have no experience  on large datasets so people with more experience in
this area are going to have to chime in.
My gut feel is 13 seconds for Postgresql to sort through an index of that
size and table is not bad.

you may need to take a look at hardware and postgresql.config settings to
improve the performance for this query

This query is very simple where changing it around or adding index results
massive improvements is not going to help in this case.
    
the hardware is e5405 dual quad core on a 16GB RAM machine, with 8.3.1
default settings except maximum connections increased...
  
That could be problem, Postgresql default settings are very conservative.

You need to read http://www.postgresqldocs.org/wiki/Performance_Optimization
and tune posgtresql.config settings. 

What OS are you running?
What is Disk Subsystem setup??? 
--------------030005060001050204010003--