Re: View with and without ::text casting performs differently.

Поиск
Список
Период
Сортировка
От Mark Mayo
Тема Re: View with and without ::text casting performs differently.
Дата
Msg-id CAMpn5AUzbOckOW1eo_-pU0vFn7Sv+vddM2T9MRmGVRJga5f5gA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: View with and without ::text casting performs differently.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: View with and without ::text casting performs differently.
Список pgsql-performance
Good Afternoon,

I also came across this too.
The issue goes away if you keep your join columns the same data type on both tables.
The nested loop happens when the join columns are not the same data type.
Hope this helps.

Best
-Mark


On Fri, Sep 6, 2013 at 2:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Brian Fehrle <brianf@consistentstate.com> writes:
> On 09/05/2013 05:50 PM, Tom Lane wrote:
>> I rather doubt that the now-explicit-instead-of-implicit casts have much
>> to do with that.  It seems more likely that you forgot to re-ANALYZE in
>> the new database, or there are some different planner settings, or
>> something along that line.

> I have two versions of the view in place on the same server, one with
> the typecasting and one without, and this is where I see the differences
> (no ::text runs in 0.5ms and with ::text runs in 13 or so minutes with
> nested loop), so it's all running off the same statistics on the data.

Hm.  Can you provide a self-contained example?

                        regards, tom lane


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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: View with and without ::text casting performs differently.
Следующее
От: Mark Mayo
Дата:
Сообщение: Re: View with and without ::text casting performs differently.