From: Morgan Ramsay <morgan.ramsay@gmail.com>
To: 'Rosser Schwarz' <rosser.schwarz@gmail.com>
Cc: 'PgSQL ADMIN' <pgsql-admin@postgresql.org>
Subject: Re: Out of memory running 560 MB query
Date: Sun, 14 Sep 2014 17:53:39 -0700
Message-ID: <000001cfd07f$7e577ac0$7b067040$@gmail.com> (raw)
In-Reply-To: <CAFnxYwhgfLqyvvgYE-LMbiQHsdMX=jRi6=oR9jSPor2AnH2mWg@mail.gmail.com>
References: <1a9b601cfd07a$a16c71a0$e44554e0$@gmail.com>
<CAFnxYwhgfLqyvvgYE-LMbiQHsdMX=jRi6=oR9jSPor2AnH2mWg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Sorry, I was running the query on what appeared to be a cached copy of the old table—or something.
After a reboot, everything seems to be working. The admin client wasn’t responding but now all of my data is there.
With regard to the list, I wasn’t sure whether there was a .conf setting that limited the size of queries or whether there was a query size limit.
—Morgan
From: Rosser Schwarz [mailto:rosser.schwarz@gmail.com]
Sent: Sunday, September 14, 2014 5:28 PM
To: Morgan Ramsay
Cc: PgSQL ADMIN
Subject: Re: [ADMIN] Out of memory running 560 MB query
On Sun, Sep 14, 2014 at 5:18 PM, Morgan Ramsay <morgan.ramsay@gmail.com> wrote:
Any idea how to successfully run a query that large? What’s the size limit of a query?
Without seeing your actual query (or a syntactically similar one, if there are private details you can't disclose), it's difficult to say. In general, though, a couple of thoughts come to mind:
Can you run it as a single COPY statement, instead of however many individual INSERTS? Failing that, can you use the multi-row VALUES syntax for your INSERT?
As an aside, this type of question is probably more suited for the pgsql-sql list, rather than -admin.
rls
--
:wq
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-admin@postgresql.org
Cc: morgan.ramsay@gmail.com, rosser.schwarz@gmail.com
Subject: Re: Out of memory running 560 MB query
In-Reply-To: <000001cfd07f$7e577ac0$7b067040$@gmail.com>
* 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