X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C39BA563F4 for ; Mon, 14 Mar 2005 16:23:44 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74603-06 for ; Mon, 14 Mar 2005 16:23:41 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 41C4F563AA for ; Mon, 14 Mar 2005 16:23:40 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2EGNaZD014080; Mon, 14 Mar 2005 11:23:36 -0500 (EST) To: =?ISO-8859-15?Q?Miroslav_=A6ulc?= Cc: PFC , John Arbash Meinel , PGSQL mailing list Subject: Re: How to read query plan In-reply-to: <423556B8.4020500@startnet.cz> References: <42345D24.8070104@startnet.cz> <4234692E.3050802@arbash-meinel.com> <42347407.2000202@startnet.cz> <42347D5E.9000900@arbash-meinel.com> <42348F54.1000408@startnet.cz> <423493E5.6040203@arbash-meinel.com> <42355249.8090101@startnet.cz> <423556B8.4020500@startnet.cz> Comments: In-reply-to =?ISO-8859-15?Q?Miroslav_=A6ulc?= message dated "Mon, 14 Mar 2005 10:17:44 +0100" Date: Mon, 14 Mar 2005 11:23:36 -0500 Message-ID: <14079.1110817416@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/265 X-Sequence-Number: 10970 =?ISO-8859-15?Q?Miroslav_=A6ulc?= writes: > PFC wrote: >> Instead of a varchar(1) containing 'y' or 'n' you could use a BOOL >> or an integer. > Sure I could. The problem is our project still supports both MySQL and > PostgreSQL. We used enum('Y','N') in MySQL so there would be a lot of > changes in the code if we would change to the BOOL data type. Just FYI, I did a quick search-and-replace on your dump to replace varchar(1) by "char", which makes the column fixed-width without any change in the visible data. This made hardly any difference in the join speed though :-(. So that is looking like a dead end. John's idea about re-joining to the main table to pick up the bulk of its fields only after joining to the sub-tables might work. regards, tom lane