Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 810829FA03C for ; Sat, 27 Oct 2007 06:17:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 22995-03 for ; Sat, 27 Oct 2007 06:12:38 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by postgresql.org (Postfix) with ESMTP id 363319FA510 for ; Sat, 27 Oct 2007 06:12:46 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id j3so806562ugf for ; Sat, 27 Oct 2007 02:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=tNY/aSXTdhkJoP92RREAK4P8HArFtMrfw9rXa+OZus0=; b=MxzVFIDxlYunzXpXX57XRv2xUr6bvgKByC89elGUcAu/3EfYHJmbcN0JbjIs0Y6BzA5sblFWF22WeWlKnpK2bRrUXZxT8TQmffgijr5NJKyGCrlwyjZvu50nSC681G09189QaRUk8hkXm0GfwXB5XTp6i7RnRJZi7EdEvtt2J44= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=gTTc0Q5Z2BxonHP1z8gCFSQ/Xb23AvXjeQ7YMoa7fdCdotl4RXv+mD1BfCuVXPtVhnKlHFwbrMc6QnJ3T2xpKzTVWT2ViMN9uytH8uDoReD5jcuLGRpkxJfKZ4J1DECDjjQ+4GspSXZxjqCZdnJA8L7tKRaUrMfWkhTHoWucphA= Received: by 10.67.90.4 with SMTP id s4mr1810241ugl.1193476365369; Sat, 27 Oct 2007 02:12:45 -0700 (PDT) Received: from ?192.168.1.34? ( [86.27.81.127]) by mx.google.com with ESMTPS id x26sm3474563ugc.2007.10.27.02.12.42 (version=SSLv3 cipher=RC4-MD5); Sat, 27 Oct 2007 02:12:43 -0700 (PDT) Message-ID: <472300C4.70800@enterprisedb.com> Date: Sat, 27 Oct 2007 10:11:32 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.12 (X11/20070730) MIME-Version: 1.0 To: Anton CC: pgsql-performance@postgresql.org Subject: Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1 References: <46CEB522.9030907@enterprisedb.com> <8cac8dd0710262126t147f8974rb58a1e7c615e0725@mail.gmail.com> <8491.1193463449@sss.pgh.pa.us> <8cac8dd0710270153v5d6a6dfar1850597750bf17e2@mail.gmail.com> In-Reply-To: <8cac8dd0710270153v5d6a6dfar1850597750bf17e2@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/320 X-Sequence-Number: 27342 Anton wrote: > I repost here my original question "Why it no uses indexes?" (on > partitioned table and ORDER BY indexed_field DESC LIMIT 1), if you > mean that you miss this discussion. As I said back then: The planner isn't smart enough to push the "ORDER BY ... LIMIT ..." below the append node. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com