From: Tom Lane <tgl@sss.pgh.pa.us>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance regression from 8.3.7 to 9.0.3
Date: Mon, 14 Mar 2011 14:50:36 -0400
Message-ID: <27391.1300128636@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTikdC0r5m1znj9G+0Pm+x13UckoVKTdGmaGtBdTg@mail.gmail.com>
References: <AANLkTikWkvgQZVbA_x8_b6-T+e_vZGf0FGzQS9Pi0GRs@mail.gmail.com>
<AANLkTingT-KjRM_iqyu0jzAh7CScLXs9ZYwKM7-GMFSk@mail.gmail.com>
<AANLkTikdC0r5m1znj9G+0Pm+x13UckoVKTdGmaGtBdTg@mail.gmail.com>
Claudio Freire <klaussfreire@gmail.com> writes:
> CREATE OR REPLACE VIEW member_all_tags_v AS
> SELECT member_tags.member_id, member_tags.last_modification_date,
> member_tags.polarity, member_tags.tag_id, 'mr' AS source
> FROM member_tags
> UNION ALL
> SELECT member_profile_tags.member_id,
> member_profile_tags.last_modification_date, member_profile_tags.polarity,
> member_profile_tags.tag_id, 'profile' AS source
> FROM member_profile_tags;
Try casting those constants to text (or something) explicitly, ie
'mr'::text AS source etc. I forget at the moment why leaving them as
unknown literals interferes with optimization, but it does.
regards, tom lane
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, klaussfreire@gmail.com
Subject: Re: Performance regression from 8.3.7 to 9.0.3
In-Reply-To: <27391.1300128636@sss.pgh.pa.us>
* 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