X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DC2499FB1CD for ; Thu, 24 Aug 2006 11:34:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 69332-09 for ; Thu, 24 Aug 2006 11:34:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 599589FA6B1 for ; Thu, 24 Aug 2006 11:34:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k7OEYPhD004456; Thu, 24 Aug 2006 10:34:25 -0400 (EDT) To: emilu@encs.concordia.ca cc: pgsql-sql@postgresql.org Subject: Re: The length of the sql query In-reply-to: <44EDA277.90704@encs.concordia.ca> References: <44EC961F.4060106@encs.concordia.ca> <44EDA277.90704@encs.concordia.ca> Comments: In-reply-to Emi Lu message dated "Thu, 24 Aug 2006 08:58:31 -0400" Date: Thu, 24 Aug 2006 10:34:25 -0400 Message-ID: <4455.1156430065@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.149 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/177 X-Sequence-Number: 26135 Emi Lu 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