pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pking@nrcan.gc.ca
To: pgsql-bugs@postgresql.org
Subject: BUG #7591: Large query string has limit
Date: Tue, 09 Oct 2012 15:24:23 +0000
Message-ID: <E1TLbfT-00063H-Si@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      7591
Logged by:          Pat King
Email address:      pking@nrcan.gc.ca
PostgreSQL version: 9.1.3
Operating system:   RedHat Linux 6.2
Description:        

Hi :

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.

I tried the query for < 50,000 OR clauses with success.

The spatialindex table is :

geonetwork=# \d spatialindex
          Table "public.spatialindex"
  Column  |          Type          | Modifiers
----------+------------------------+-----------
 fid      | integer                | not null
 id       | character varying(250) |
 the_geom | geometry               |
Indexes:
    "spatialindex_pkey" PRIMARY KEY, btree (fid)
    "spatialindexndx1" btree (id)
    "spatialindexndx2" gist (the_geom)
Check constraints:
    "enforce_dims_the_geom" CHECK (st_ndims(the_geom) = 2)
    "enforce_geotype_the_geom" CHECK (geometrytype(the_geom) =
'MULTIPOLYGON'::text OR the_geom IS NULL)
    "enforce_srid_the_geom" CHECK (st_srid(the_geom) = 4326)








view thread (2+ messages)  latest in thread

Message-ID: <E1TLbfT-00063H-Si@wrigleys.postgresql.org>
Permalink:  ../E1TLbfT-00063H-Si@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1TLbfT-00063H-Si@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pking@nrcan.gc.ca
  Subject: Re: BUG #7591: Large query string has limit
  In-Reply-To: <E1TLbfT-00063H-Si@wrigleys.postgresql.org>
  References: <E1TLbfT-00063H-Si@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox