X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 59B655284B for ; Sat, 4 Jun 2005 08:41:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20816-08 for ; Sat, 4 Jun 2005 11:41:35 +0000 (GMT) Received: from viper.eo.pl (viper.eo.pl [217.17.46.133]) by svr1.postgresql.org (Postfix) with ESMTP id 0AEF95283D for ; Sat, 4 Jun 2005 08:41:34 -0300 (ADT) Received: from xxx.hq.eo.pl ([192.168.20.129] helo=localhost.localdomain) by viper with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1DeX1x-0000Dn-T7; Sat, 04 Jun 2005 13:41:37 +0200 Received: from depesz by localhost.localdomain with local (Exim 4.50) id 1DeX1w-0005a4-7D; Sat, 04 Jun 2005 13:41:32 +0200 Date: Sat, 4 Jun 2005 13:41:32 +0200 From: hubert lubaczewski To: PFC Cc: pgsql-performance@postgresql.org Subject: Re: strategies for optimizing read on rather large tables Message-ID: <20050604114132.GB21031@eo.pl> Reply-To: hubert.lubaczewski@eo.pl References: <20050604081742.GA29123@eo.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: X-info-en-1: this message *may* reflect my personal opinion. it is *not* X-info-en-2: intended to reflect those of my employer, or anyone else. X-info-pl-1: wszelkie opinie =?iso-8859-2?Q?wyra=BFone_?= =?iso-8859-2?Q?w_tym_li=B6cie_prezentuj=B1_wy=B3=B1cznie_pogl=B1dy?= X-info-pl-2: autora listu. opinie =?iso-8859-2?Q?te_?= =?iso-8859-2?Q?w_=BFadnym__razie_nie__wyra=BFaj=B1__pogl=B1d=F3w?= X-info-pl-3: pracodawcy autora =?iso-8859-2?Q?listu_?= =?iso-8859-2?Q?_ani__innych__zwi=B1zanych__z__nim__os=F3b=2E?= User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200506/89 X-Sequence-Number: 12727 --yNb1oOkm5a9FJOVX Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline On Sat, Jun 04, 2005 at 01:18:04PM +0200, PFC wrote: > Then write your query as : > select advert_id from acr_cache where category_id = ? and region_id = ? > order by category_id, region_id, XXX limit 20; this is great idea - i'll check it out definitelly. depesz --yNb1oOkm5a9FJOVX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCoZNs5ZmPxbV4/n4RArrRAJsFUOzzlfGbNc9Zz/ZoqhYnEo6hlACeOJly G0tkKk/bSLEfuh8wOxUc6X0= =2swm -----END PGP SIGNATURE----- --yNb1oOkm5a9FJOVX--