Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B1842476A34 for ; Mon, 20 Jan 2003 16:05:27 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 0C042476BD6 for ; Mon, 20 Jan 2003 16:01:25 -0500 (EST) Received: from klaster.net (pa59.krakow.cvx.ppp.tpnet.pl [213.76.36.59]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id CE9A72B84E; Mon, 20 Jan 2003 21:57:25 +0100 (CET) Message-ID: <3E2C64AB.2070101@klaster.net> Date: Mon, 20 Jan 2003 22:05:47 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: mlennert@club.worldonline.be Cc: pgsql-sql@postgresql.org Subject: Re: performance question References: <59665.164.15.128.4.1043062834.squirrel@http://moritz.homelinux.org> In-Reply-To: <59665.164.15.128.4.1043062834.squirrel@http://moritz.homelinux.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/306 X-Sequence-Number: 11171 Moritz Lennert wrote: >Hello, > >I have a table with some 2.2 million rows on a Pentium4, 1.8GHz with 512 >MB RAM. >Some queries I launch take quite a long time, and I'm wondering whether >this is normal,or whether I can get better performance somehow. > >As an example, I have a field which is in char(2), with 23 different >possible values. This field is not too selective. Are there any more fields which are always in where condition? If yes, indexing on more than one field should help. Tomasz Myrta