RE: query length limits

From: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
To: "'tjk(at)tksoft(dot)com'" <tk(at)uno(dot)tksoft(dot)com>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>, "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: query length limits
Date: 1999-07-17 10:17:08
Message-ID: 1BF7C7482189D211B03F00805F8527F70ED04E@S-NATH-EXCH2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Well, this is what I have discovered so far:

I left BLCKSZ as it was, but adjusted MAX_QUERY_SIZE to 65535, and ran make.
I tried to run a 50k query, and it worked; it took a while, but the results
were fine. So, as a temporary solution to this problem, you should be able
to set MAX_QUERY_SIZE up to what you require (don't go overboard, and please
let me know of any problems). However, make sure that you test it properly
first, because I didn't do extensive testing, just enough to make sure that
it didn't break immediately. Also, please remember that long queries
definitely impact the query processor, so long queries are not a great idea
for online sub-systems. They're not great for batch either, but at least
there you have a window to play with.

More news to come.....

MikeA

>> >
>> > Troy wrote:
>> > >> Does Postgres have any limitations on
>> > >> the length of queries?
>> > >>
>> > >> E.g. is "select one,two,three,...thousand from
>> one,two,three,...thousand
>> > where one = x and two is >> x and three is x and ...
>> thousand = x" legal?
>> > >>
>> > Yes, there is. It is set to BLCKSZ * 2, at least in 6.5.
>> BLCKSZ is
>> > normally 8192 bytes, so your query size will be 16k.
>> However, I'm busy
>> > working on it at the moment, to make it unlimited (i.e.:
>> limited by memory
>> > available).
>> >
>> > MikeA
>> >
>> >
>>

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-07-17 15:15:57 Re: [HACKERS] Fix up for BTP_CHAIN problems
Previous Message Thomas Lockhart 1999-07-17 06:06:02 Re: [HACKERS] Contributing

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-07-17 15:57:27 Re: [INTERFACES] Postgres 6.5 and PQsetdb(,,"-F",,)
Previous Message Jean-Denis Girard 1999-07-17 08:27:35 Postgres 6.5 and PQsetdb(,,"-F",,)