pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: emilu@encs.concordia.ca
Cc: pgsql-sql@postgresql.org
Subject: Re: The length of the sql query
Date: Thu, 24 Aug 2006 10:34:25 -0400
Message-ID: <4455.1156430065@sss.pgh.pa.us> (raw)
In-Reply-To: <44EDA277.90704@encs.concordia.ca>
References: <44EC961F.4060106@encs.concordia.ca>
	<44EDA277.90704@encs.concordia.ca>

Emi Lu <emilu@encs.concordia.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



view thread (3+ messages)

Message-ID: <4455.1156430065@sss.pgh.pa.us>
Permalink:  ../4455.1156430065@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4455.1156430065@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, emilu@encs.concordia.ca
  Subject: Re: The length of the sql query
  In-Reply-To: <4455.1156430065@sss.pgh.pa.us>

* 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