Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8B720633205 for ; Wed, 7 Apr 2010 09:51:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 42967-10 for ; Wed, 7 Apr 2010 12:51:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mail.postgresql.org (Postfix) with ESMTP id CCF6A6331C9 for ; Wed, 7 Apr 2010 09:51:19 -0300 (ADT) Received: by bwz8 with SMTP id 8so828848bwz.3 for ; Wed, 07 Apr 2010 05:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=R+RjJ07DJkKMsH9kcJ48c36NMSNGoyX9rC9Do6rFJWs=; b=UN6hgVIAc+HATWPHa9XPLMuZGwq28IZnE9SDpAf6IYJgZfWDbQn4BDK557rhWSs67r f0QZ0sxuTUnGHQXIykftaaxZ7paL/lXb91s8VYtFo9xG7wLxE7mZABmvba4kaEU96nkJ 1S5SF9mPpGzBddrsoyuhPOflVobcPCqtpTHDE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=pPuWAbyIRWjC3uxa6T435NfjS+XmnTVa8h3sM4XD+tUpQ6c566S1KvzwmpYdtXXM5y Xvc/9yRw9bq1dkwyRsU/huNwDVdg9tvIRFeWxAee4R15LXRwHnstEdTMsnL8WgEyLAl2 e1SsxsgjLBDz/897LRcEAqPxequ6bjKJ2thB0= MIME-Version: 1.0 Received: by 10.204.46.154 with HTTP; Wed, 7 Apr 2010 05:51:17 -0700 (PDT) In-Reply-To: References: Date: Wed, 7 Apr 2010 13:51:17 +0100 Received: by 10.204.13.68 with SMTP id b4mr9393054bka.133.1270644677713; Wed, 07 Apr 2010 05:51:17 -0700 (PDT) Message-ID: Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index From: =?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= To: Sherry.CTR.Zhu@faa.gov Cc: Joel Jacobson , pgsql-performance@postgresql.org, Robert Haas Content-Type: multipart/alternative; boundary=00151750d9d4a6a0060483a50484 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.109 tagged_above=-10 required=5 tests=BAYES_05=-1.11, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201004/65 X-Sequence-Number: 38315 --00151750d9d4a6a0060483a50484 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 7, 2010 at 1:20 PM, wrote: > > Guys, > > Thanks for trying and opening your mind. > If you want to know how Oracle addressed this issue, here it is: index > on two columns. I remember that they told me in the training postgres has > no this kind of index, can someone clarify? > > lies. postgresql allows you indices on multiple columns. What it does not have, is index on multiple tables. -- GJ --00151750d9d4a6a0060483a50484 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Wed, Apr 7, 2010 at 1:20 PM, <Sherry.CTR.Zhu@faa= .gov> wrote:

Guys,

=C2=A0 Thanks for trying and openi= ng your mind. =C2=A0
=C2=A0 If you want to know how Ora= cle addressed this issue, here it is: =C2=A0index on two columns. =C2=A0I remem= ber that they told me in the training postgres has no this kind of index, can someone clarify?


lies. postgresql allows you indices on multiple c= olumns. What it does not have, is index on multiple tables.



--
GJ
--00151750d9d4a6a0060483a50484--