| От | Tom Lane |
|---|---|
| Тема | Re: BUG #7591: Large query string has limit |
| Дата | |
| Msg-id | 2282.1349807667@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #7591: Large query string has limit (pking@nrcan.gc.ca) |
| Список | pgsql-bugs |
pking@nrcan.gc.ca writes:
> I am dealing with the open source program called "Geonetwork". It is passing
> the following query to postgres/postgis :
> SELECT "fid", asText("the_geom") FROM "public"."spatialindex" WHERE ("fid" =
> '10') OR ("fid" = '100') OR ("fid" = '1000') OR ("fid" = '10001') OR ("fid"
> = '10005') ..........
> Unfortunately, the query has > 50,000 OR clauses, and the query hangs.
[ rolls eyes ... ] You will not find a lot of DBMSes that don't have
indigestion with that. It's possible that converting to an IN list
would be less inefficient, but personally I'd suggesting putting all the
target IDs into a temp table and joining to that.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера