Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 6D8226335ED for ; Wed, 7 Apr 2010 10:12:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 47696-03 for ; Wed, 7 Apr 2010 13:12:30 +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 7CF1D6331D2 for ; Wed, 7 Apr 2010 10:12:38 -0300 (ADT) Received: by bwz8 with SMTP id 8so848653bwz.3 for ; Wed, 07 Apr 2010 06:12:36 -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=IuiDRu9iNfSVG+wz2/uZJNW61wkLehhGsyMBr3rnmNs=; b=QJZmxTv75B1mkZBRtujLEo+yXmWChfODy45l/AYHzk0nFNYj9fh5rcMMD0HQrVM5JR gfbB6BnAZd112RE33vul+Mu0MQ9JvajcwbIPdhmb1Qcm9OTdMa38htU7KAsP+KGg/F4K 0uYIyE+jXwPurh+R1BggLgGc84EZ6OAUuIS1Y= 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=n12Rtbe9NQ4BgUtZSKd+tLSDNu3GVAZghld9NS9KNGymPj90VfGv4qaRQAkOS/t4Qs pmLgSubtuvRBevZLSjAxMWaqBsnN4K3qVWqoqnsJfz9/7ezi5DC+AV+8us1ApPTs5Fnp VTXoe/jObp4jaPDLeD+ZKjqCu7p0dwv0DfdEY= MIME-Version: 1.0 Received: by 10.204.46.154 with HTTP; Wed, 7 Apr 2010 06:12:35 -0700 (PDT) In-Reply-To: References: Date: Wed, 7 Apr 2010 14:12:35 +0100 Received: by 10.204.138.219 with SMTP id b27mr9185746bku.139.1270645955450; Wed, 07 Apr 2010 06:12:35 -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=001517448606cf58eb0483a55021 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.366 tagged_above=-10 required=5 tests=AWL=-0.257, BAYES_05=-1.11, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201004/67 X-Sequence-Number: 38317 --001517448606cf58eb0483a55021 Content-Type: text/plain; charset=UTF-8 2010/4/7 > > Do you mean one index on two columns? > > something like this: create index idx1 on tb1(col1, col2); > yup :) It would be quite useless without that feature. Don't listen to oracle folks, they obviously know not much about products others than oracle db(s). -- GJ --001517448606cf58eb0483a55021 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

2010/4/7 <Sherry.CTR.Zhu@faa.gov>

Do you mean one index on two colum= ns?

something like this: =C2=A0 create= index idx1 on tb1(col1, col2);
yup :) It would be quite useless without that feature= .
Don't listen to oracle folks, they obviously know not much about = products others than oracle db(s).
=C2=A0




--
GJ
--001517448606cf58eb0483a55021--