Re: BUG #7591: Large query string has limit

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #7589: Canceled "CREATE UNIQUE INDEX CONCURRENTLY" leave not-fully-build index existing
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #7590: Data corruption using pg_dump only with -Z parameter