Forcing materialize in the planner

Started by Robert Jamesover 12 years ago2 messagesgeneral
Jump to latest
#1Robert James
srobertjames@gmail.com

I have a query which, when I materialize by hand some of its
components, runs 10x faster (including the time needed to
materialize). Is there any way to force Postgres to do that? Or do I
need to do this by hand using temp tables?

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Jack Christensen
jack@jackchristensen.com
In reply to: Robert James (#1)
Re: Forcing materialize in the planner

Have you tried putting those components in a common table expression?
I'm not sure if it absolutely forces the materialization or not, but in
practice that has been my experience.

Robert James wrote:

I have a query which, when I materialize by hand some of its
components, runs 10x faster (including the time needed to
materialize). Is there any way to force Postgres to do that? Or do I
need to do this by hand using temp tables?

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general