Re: Problem with performance using query with unnest after migrating from V9.1 to V9.2 and higher - Mailing list pgsql-performance

From Knels, Udo
Subject Re: Problem with performance using query with unnest after migrating from V9.1 to V9.2 and higher
Date
Msg-id d47753011ac64182aa3fada94c6a4710@EXCH-1.ddd-do.de
Whole thread Raw
In response to Re: Problem with performance using query with unnest after migrating from V9.1 to V9.2 and higher  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-performance
Hi,

Thank you very much for your answers.

Yes, 50 rows aren't enough, but the original table has about 14 million rows and after analyzing the table I got the
sameresult.  

We changed our functions and used string_to_array instead of unnest and its ok.

It was not only a problem with one value to be selected. The problem exists with three or more too. Maybe the
implementationof unnest has changed from V9.1 to V9.5. In V9.1 there was only one array as argument. Since V9.4 we can
usemore than one array as argument. And so the planner works different. So, if we change from one version to another in
thefuture, we have to check the PostgreSQL-functions if the behaviour of the function or the planner has changed and
thenreplace the function. It would be great if we could see this in the documentation. 

Greetings

Udo Knels
treubuch IT GmbH



pgsql-performance by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [HACKERS] temporary table vs array performance
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] temporary table vs array performance