pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: wieck@debis.com
To: tgl@sss.pgh.pa.us
Cc: herouth@oumail.openu.ac.il
Cc: glynis@butterfly.hjsoft.com
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big.
Date: Mon, 26 Jul 1999 11:28:44 +0200 (MET DST)
Message-ID: <m118h3s-0003kvC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <12416.932918447@sss.pgh.pa.us>

Tom Lane wrote:

> I originally thought that this wouldn't work because the final parsetree
> for the top query would incorporate the other two parsetrees and still
> be too big.  But it looks like it doesn't --- when I experimented just
> now, the stored parsetree for a view referencing another view treated
> the sub-view as just a table with no inner structure.  I suppose the
> expansion doesn't happen until plan/optimize time.

    It  happens  during  rewrite  time.  The querytree stored for
    rules is just the UNrewritten output of  the  parser.  That's
    why  the rewriter is recursively calling itself with it's own
    output.

    So splitting up such a huge view into a  tree  of  views  (if
    possible)  is  a solution that must not result in a different
    final querytree (after applying  all  view  rules).  It  just
    takes  a little more time for the rewrite step - but I cannot
    estimate how much more.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #





view thread (7+ messages)  latest in thread

Message-ID: <m118h3s-0003kvC@orion.SAPserv.Hamburg.dsh.de>
Permalink:  ../m118h3s-0003kvC@orion.SAPserv.Hamburg.dsh.de/
Also on:    postgresql.org/message-id/m118h3s-0003kvC@orion.SAPserv.Hamburg.dsh.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: wieck@debis.com, tgl@sss.pgh.pa.us, herouth@oumail.openu.ac.il, glynis@butterfly.hjsoft.com
  Subject: Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big.
  In-Reply-To: <m118h3s-0003kvC@orion.SAPserv.Hamburg.dsh.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox