Received: from butterfly.hjsoft.com (mail@butterfly.hjsoft.com [205.231.166.38]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA38542 for ; Wed, 28 Jul 1999 05:29:14 -0400 (EDT) (envelope-from glynis@butterfly.hjsoft.com) Received: from localhost (glynis@localhost) by butterfly.hjsoft.com (8.9.3/8.9.3) with ESMTP id FAA07786 for ; Wed, 28 Jul 1999 05:29:09 -0400 Date: Wed, 28 Jul 1999 05:29:09 -0400 (EDT) From: "John M. Flinchbaugh" To: pgsql-sql@postgreSQL.org Subject: Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big. In-Reply-To: <12416.932918447@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 25 Jul 1999, Tom Lane wrote: > > At 23:45 +0300 on 23/07/1999, John M. Flinchbaugh wrote: > >> [ how to avoid "rule plan string too big" ? ] > He might have some luck by splitting the query into two subqueries, > one that joins half the tables and the other one joining the other half, > then a top query that joins those two. (The trick here is figuring > out how to split the tables into two groups that can be joined without > reference to the other group and without producing too many useless > tuples.) The top query is still going to be tight, because the number > of targetlist nodes (output columns) won't change, but reducing the > number of tables it references to two views and simplifying its WHERE > condition down to one or so clauses will both help eliminate nodes. i broke that huge view into a bunch of smaller ones successfully, but the top view which pulled together 2 smaller views (which each pulled together smaller parts,etc), and i got the same error. it seems to still get hung up on the number of columns the view was returning, so i had to drop a few of the less useful columns to get it to create the view successfully. ____________________}John Flinchbaugh{______________________ | -> glynis@hjsoft.com <- john@cs.millersv.edu | | glynis@netrax.net http://www.hjsoft.com/~glynis/ | ~~Powered by Linux: Reboots are for hardware upgrades only~~