Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?
От | Clemens Eisserer |
---|---|
Тема | Re: Any disadvantages of using =ANY(ARRAY()) instead of IN? |
Дата | |
Msg-id | CAFvQSYSAcrEcJS9YYuvZtiN_8DjOt3G5YOu=YZ8ksDiFdLzZuA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Any disadvantages of using =ANY(ARRAY()) instead of IN? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?
|
Список | pgsql-performance |
Hi Tom, Thanks for your reply. > What PG version are we talking about here? For development I use 9.1.3, on the production server is 8.4.7 - happens with both cases. > That doesn't sound like a tremendously good idea to me. Could you elaborate on the downsides of this approach a bit? > But with > so few details, it's hard to comment intelligently. > Can you provide a concrete test case? A self contained testcase would take some time to create (and list members willing to configure and run), so I hope a query as well as an explain-analyze run will provide more information (done with 9.1.3): http://pastebin.com/BGRdAPg2 Its kind of the worst-worst case which I will improve later (way too much relations loaded through join-fetching), but its quite a good way to show the issue. Replacing the IN with a ANY(ARRAY()) already yields a way better plan. Thank you in advance, Clemens
В списке pgsql-performance по дате отправления: