Re: How bad is using queries with thousands of values for operators IN or ANY? - Mailing list pgsql-general

From Thorsten Schöning
Subject Re: How bad is using queries with thousands of values for operators IN or ANY?
Date
Msg-id 777088788.20200831111619@am-soft.de
Whole thread Raw
In response to Re: How bad is using queries with thousands of values for operators IN or ANY?  (Tim Cross <theophilusx@gmail.com>)
List pgsql-general
Guten Tag Tim Cross,
am Montag, 31. August 2020 um 10:21 schrieben Sie:

> It would help to see the query as well as the plan.

I've attached both to my mail and my received copy shows it's
available. Maybe the following file hoster works better for you:

https://gofile.io/d/vWPliD
https://gofile.io/d/AiaDmN

> Where are these 100s of IDs coming from? I sometimes find this a sign
> you could be re-structuring your query to be a join between two tables
> where one table contains the IDs of interest rather than trying to embed
> them into the query as part of a where clause.

It's somewhat like that, but on a higher level: My app has different
functions, one searching for some rows according to some criteria and
returning IDs, one reader for those IDs and caring about additional
things. It's like that because both has already been available
individually and is necessary individually, while sometimes it make
sense to combine them.

Integrating things is an option of cource, that's exactly why I asked
for opinions about how bad the current implementation is. If this
concrete apsect is not too bad, I might simply keep it and look
elsewhere to improve.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow




pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: How bad is using queries with thousands of values for operators IN or ANY?
Next
From: Thorsten Schöning
Date:
Subject: Re: How bad is using queries with thousands of values for operators IN or ANY?