Re: The length of the sql query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: emilu(at)encs(dot)concordia(dot)ca
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: The length of the sql query
Date: 2006-08-24 14:34:25
Message-ID: 4455.1156430065@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Emi Lu <emilu(at)encs(dot)concordia(dot)ca> writes:
> Could someone tell me where I can find PostgreSQL doc about the query
> length please

The theoretical limit is 1Gb (because palloc won't allow creation of a
longer string than that). The practical limit is probably a great deal
less, especially if you don't have a 64-bit machine with gobs of memory,
because the query text itself is hardly the major consumer of memory
for any real-world query.

Your question is really entirely meaningless when you haven't specified
exactly what sort of query you're thinking of or what kind of platform
you intend to try to run it on.

The 1Gb upper limit for MySQL is a pretty academic number too, for
exactly the same reasons. Have you tried putting a 1Gb query string
into MySQL?

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Sumeet 2006-08-24 14:47:57 Importing data from csv
Previous Message Emi Lu 2006-08-24 12:58:31 Re: The length of the sql query