Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9F4F02E004C for ; Tue, 4 Dec 2007 16:03:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75257-10 for ; Tue, 4 Dec 2007 16:03:19 -0400 (AST) Received: from io.link-m.de (io.link-m.de [89.250.128.34]) by postgresql.org (Postfix) with ESMTP id A8A022E0075 for ; Tue, 4 Dec 2007 16:03:19 -0400 (AST) Received: from cl-40.muc-02.de.sixxs.net (cl-40.muc-02.de.sixxs.net [2001:a60:f000:27::2]) (AUTH: CRAM-MD5 julian@mehnle.net, TLS: TLSv1/SSLv3, 256bits, AES256-SHA) by io.link-m.de with esmtp; Tue, 04 Dec 2007 20:03:17 +0000 id 0008C025.4755B284.00006322 From: Julian Mehnle To: pgsql-performance@postgresql.org Subject: Re: Bad query plans for queries on partitioned table Date: Tue, 4 Dec 2007 20:03:14 +0000 User-Agent: KMail/1.9.7 References: <200712041944.13543.julian@mehnle.net> In-Reply-To: <200712041944.13543.julian@mehnle.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2131070.ixENcyrr8f"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200712042003.14121.julian@mehnle.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/55 X-Sequence-Number: 27871 --nextPart2131070.ixENcyrr8f Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Julian Mehnle wrote: > I have a large database with e-mail meta-data (no bodies) for over 100 > million messages. I am running PostgreSQL 8.2.4 on a server with 2GB > of RAM (shared_buffers = 240MB, temp_buffers = 128MB, work_mem = 256MB, > maintenance_work_mem = 256MB). I have the data split in two separate > tables, "email" and "email_extras": > [...] > > Each of these tables has been partitioned equally based on the "ts" > (timestamp) field into two dozen or so tables, each covering one week > of messages. For testing purposes, I have only one week's partition > filled for each of the "email" and "email_extras" tables > (email_2007_week34 {,extras}). Oh, just for the record: I do have "constraint_exclusion" enabled. Julian. --nextPart2131070.ixENcyrr8f Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHVbKCwL7PKlBZWjsRAv0rAKCdZuVPdoZCm/OUFGwXpVDZbYFLTACgiuku sZNdpfN4wqdmyGl1vLxo2LU= =KV8k -----END PGP SIGNATURE----- --nextPart2131070.ixENcyrr8f--