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 8E9449DCDFD for ; Fri, 10 Feb 2006 21:46:14 -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 54583-09-5 for ; Fri, 10 Feb 2006 21:46:17 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.206]) by postgresql.org (Postfix) with ESMTP id 1CA6A9DCDD7 for ; Fri, 10 Feb 2006 21:46:10 -0400 (AST) Received: by uproxy.gmail.com with SMTP id u2so152229uge for ; Fri, 10 Feb 2006 17:46:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=KMbDxwMSs02SjdoGo7hohuPMULBSW3XlRTTEV1thjDSF2gnFZvk19ekgUpjUG5xoaVewVFboBxr7pGYE+8drd4jv58ZYMe+J0Fr65OtdnRRmi46e5vA9r21VWMyutjKv0kNrYPStxVNX3vxgN8Ty0QcDt/+xtVs5QSA4Pq5jAyc= Received: by 10.67.19.7 with SMTP id w7mr17655ugi; Fri, 10 Feb 2006 17:46:14 -0800 (PST) Received: by 10.66.244.2 with HTTP; Fri, 10 Feb 2006 17:46:14 -0800 (PST) Message-ID: Date: Fri, 10 Feb 2006 20:46:14 -0500 From: uwcssa To: pgsql-performance@postgresql.org Subject: postgresql geqo optimization MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4352_574285.1139622374620" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.564 required=5 tests=[AWL=-0.714, HTML_10_20=0.945, HTML_MESSAGE=0.001, RCVD_IN_BL_SPAMCOP_NET=1.332] X-Spam-Score: 1.564 X-Spam-Level: * X-Archive-Number: 200602/127 X-Sequence-Number: 17113 ------=_Part_4352_574285.1139622374620 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I have a question with regard to GEQO optimizer of Postgresql. For complex queries with over 12 tables in a join, (12 is the default value), the Postgresql optimizer by default will not use the dynami= c programming style optimizer. Instead, it uses genetic algorithm to compute = a sub-optimal query plan. The reason is that GEQO takes sub-seconds to find = a query plan while the DP style optimizer will take minutes or even hours to optimize a complex query with large join degree. I am wondering if anyone here ever had complex queries that the GEQO fails to work properly, i.e., finds a terrible query plan as compared to one found by DP optimizer (by forcing Postgresql always uses DP). This is important to me since I am trying to see what type of queries will be worth spending a lot of time doing a thorough DP optimization (if it is going to be executed again and again). thanks a lot! ------=_Part_4352_574285.1139622374620 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I have a question with regard to GEQO optimizer of Postgresql.
 
For complex queries with over 12 tables in a join, (12 is the
default value), the Postgresql optimizer by default will not use the d= ynamic programming style optimizer. Instead, it uses genetic algorithm to c= ompute a sub-optimal query plan.  The reason is that GEQO takes sub-se= conds to find a query plan while the DP style optimizer will take minutes o= r even hours to optimize a complex query with large join degree.
 
I am wondering if anyone here ever had complex queries that the GEQO f= ails to work properly, i.e.,  finds a terrible query plan as compared = to one found by DP optimizer (by forcing Postgresql always uses DP). &= nbsp;  This is important to me since I am trying to see what type of q= ueries will be worth spending a lot of time doing a thorough DP optimizatio= n (if it is going to be executed again and again).
 
thanks a lot!
------=_Part_4352_574285.1139622374620--