pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tsuraan <tsuraan@gmail.com>
To: tsuraan <tsuraan@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Scaling concerns
Date: Sat, 16 Dec 2006 12:03:38 -0600
Message-ID: <84fb38e30612161003gded26aalfcd3aa0a5176c75c@mail.gmail.com> (raw)
In-Reply-To: <20061216173221.GA25410@uio.no>
References: <84fb38e30612160926l609ec55cs352b2495289bae0c@mail.gmail.com>
	<20061216173221.GA25410@uio.no>

> Unqualified SELECT COUNT(*) FROM foo is one of the most expensive operations
> you can do on your system, since the visibility information has to be
> checked
> on disk for each row. Instead, try real queries on real data, and post here
> if some are too slow for you.

Ok, that's a bad example.  I'm learning :-)  Is insert ... select also
really expensive then?  I have a table loaded with message-id and path
information of currently-existing messages.  It has ~20 million rows.
Trying to do "INSERT INTO Messages(path, msgid) SELECT (path, msgid)
FROM tmpMessages" took a really long time before psql died with an
out-of-memory error.  Is there a more sane way to do a table copy, or
should I have just dropped all the indices from the Message table and
loaded into that?

Thanks!



view thread (12+ messages)  latest in thread

Message-ID: <84fb38e30612161003gded26aalfcd3aa0a5176c75c@mail.gmail.com>
Permalink:  ../84fb38e30612161003gded26aalfcd3aa0a5176c75c@mail.gmail.com/
Also on:    postgresql.org/message-id/84fb38e30612161003gded26aalfcd3aa0a5176c75c@mail.gmail.com

 · 

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-performance@postgresql.org
  Cc: tsuraan@gmail.com
  Subject: Re: Scaling concerns
  In-Reply-To: <84fb38e30612161003gded26aalfcd3aa0a5176c75c@mail.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