From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Eric B(dot) Ridge" <ebr(at)tcdi(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Parsing of VIEW definitions |
Date: | 2003-02-10 14:32:41 |
Message-ID: | 4971.1044887561@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Eric B. Ridge" <ebr(at)tcdi(dot)com> writes:
> So the text form of the Query *is* looked up in pg_rewrite on every
> use? Or is it looked up only once (per backend maybe?)? The docs
> didn't say... unless I overlooked it.
I think it's kept in the relcache, so in typical cases it'd be read
only once per backend.
> So what should be more efficient? Re-parsing/planning the entire SQL
> string (w/ the "view" definition in-line) or actually using the view?
Planning cost will be the same either way. Parsing costs should be
less, but on the other hand the rewriter will take some extra cycles.
My guess is it'd be about a wash --- but I've never tried to measure.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Fabrizio Ermini | 2003-02-10 14:40:02 | Re: PostgreSQL x Oracle |
Previous Message | Christopher Browne | 2003-02-10 13:59:14 | Re: PostgreSQL x Oracle |