X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0D7479DCAAF for ; Thu, 12 Jan 2006 00:21:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76677-04 for ; Thu, 12 Jan 2006 00:20:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from rambo.iniquinet.com (rambo.iniquinet.com [69.39.89.10]) by postgresql.org (Postfix) with ESMTP id 94FF69DCAAE for ; Thu, 12 Jan 2006 00:20:57 -0400 (AST) Received: (qmail 17488 invoked by uid 1010); 11 Jan 2006 23:20:56 -0500 Received: from Robert_Creager@LogicalChaos.org by rambo.iniquinet.com by uid 1002 with qmail-scanner-1.20 (spamassassin: 3.1.0. Clear:RC:0(63.147.78.66):SA:0(?/?):. Processed in 0.899434 secs); 12 Jan 2006 04:20:56 -0000 Received: from unknown (HELO thunder.logicalchaos.org) (perl?test@logicalchaos.org@63.147.78.66) by rambo.iniquinet.com with AES256-SHA encrypted SMTP; 11 Jan 2006 23:20:55 -0500 Received: from logicalchaos.org (localhost [127.0.0.1]) by thunder.logicalchaos.org (Postfix) with ESMTP id 978C7650AC; Wed, 11 Jan 2006 21:20:52 -0700 (MST) Date: Wed, 11 Jan 2006 21:20:46 -0700 From: Robert Creager To: Tom Lane Cc: Michael Fuhr , PGPerformance Subject: Re: Index isn't used during a join. Message-ID: <20060111212046.200f3e55@thunder.logicalchaos.org> In-Reply-To: <12877.1136993583@sss.pgh.pa.us> References: <20060109212338.6420af12@thunder.logicalchaos.org> <20060110055818.GA55076@winnie.fuhr.org> <20060110221055.053596ab@thunder.logicalchaos.org> <20060111075655.GA51292@winnie.fuhr.org> <20060111072659.7c1772ad@thunder.logicalchaos.org> <12877.1136993583@sss.pgh.pa.us> Organization: Starlight Vision, LLC. X-Mailer: Sylpheed-Claws 1.0.4 (GTK+ 1.2.10; i586-mandriva-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Signature_Wed__11_Jan_2006_21_20_46_-0700_9l/As_kpQKQi1.HU"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.115 required=5 tests=[AWL=0.115] X-Spam-Score: 0.115 X-Spam-Level: X-Archive-Number: 200601/147 X-Sequence-Number: 16625 --Signature_Wed__11_Jan_2006_21_20_46_-0700_9l/As_kpQKQi1.HU Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable When grilled further on (Wed, 11 Jan 2006 10:33:03 -0500), Tom Lane confessed: > The planner understands about transitivity of equality, ie given a =3D b > and b =3D c it can infer a =3D c. It doesn't do any such thing for > inequalities though, nor does it deduce f(a) =3D f(b) for arbitrary > functions f. The addition Michael suggested requires much more > understanding of the properties of the functions in your query than > I think would be reasonable to put into the planner. >=20 OK. I think reached a point that I need to re-organize how the data is sto= red, maybe ridding myself of the schema and switching entirely to views. At that point, I likely could rid myself of the function (unmunge_time) I'm using, = and work with times and doy fields. Thanks, Rob --=20 21:17:00 up 4 days, 13:43, 9 users, load average: 2.02, 2.18, 2.23 Linux 2.6.12-12-2 #4 SMP Tue Jan 3 19:56:19 MST 2006 --Signature_Wed__11_Jan_2006_21_20_46_-0700_9l/As_kpQKQi1.HU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iEYEARECAAYFAkPF2SQACgkQLQ/DKuwDYzk6+gCggGVDiEZrn9Vk4Qm2B9SkhFmT EUYAoJBEOf54PYvuSSmKFc+gJwtm2g1A =yOpl -----END PGP SIGNATURE----- --Signature_Wed__11_Jan_2006_21_20_46_-0700_9l/As_kpQKQi1.HU--