Re: Why is this query running slowly?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
Cc: "Yang Zhang" <yanghatespam(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Why is this query running slowly?
Date: 2011-09-15 23:02:13
Message-ID: 14186.1316127733@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Tomas Vondra" <tv(at)fuzzy(dot)cz> writes:
> Could the planner do this reasoning, i.e. see if there's a NOT NULL
> constraint on the column and change the plan accordingly?

Possibly. I'm not sure how expensive it would be. Right now, a
structural change of that sort would have to be done pretty early in
planning, and we don't have a lot of info collected about the tables
at that point. I'm afraid it would involve a special-purpose catalog
probe, which would add a lot of overhead.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2011-09-15 23:50:43 Re: forcing table ownership
Previous Message Richard Broersma 2011-09-15 22:17:59 Re: forcing table ownership