pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Bill <bill@math.uchicago.edu>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgresql and openmosix migration
Date: Tue, 22 Jun 2004 12:53:28 -0500
Message-ID: <20040622175328.GA20086@wolff.to> (raw)
In-Reply-To: <008201c4587e$b8856510$dfc58780@billnotebook>
References: <004001c45865$59cc9f20$dfc58780@billnotebook>
	<200406220931.23780.josh@agliodbs.com>
	<008201c4587e$b8856510$dfc58780@billnotebook>

On Tue, Jun 22, 2004 at 12:31:15 -0500,
  Bill <bill@math.uchicago.edu> wrote:
> Ok, so maybe someone on this group will have a better idea.  We have a
> database of financial information, and this has literally millions of
> entries.  I have installed indicies, but for the rather computationally
> demanding processes we like to use, like a select query to find the
> commodity with the highest monthly or annual returns, the computer generally
> runs unacceptably slow.  So, other than clustring, how could I achieve a
> speed increase in these complex queries?  Is this better in mysql or
> postgresql?

Queries using max (or min) can often be rewritten as queries using ORDER BY
and LIMIT so that they can take advantage of indexes. Doing this might help
with some of the problems you are seeing.
If you commonly query on aggregated data it might be better to create
derived tables of the aggregated data maintained by triggers, and query
against them. If you do lots of selects relative to inserts and updates,
this could be a big win.



view thread (13+ messages)  latest in thread

Message-ID: <20040622175328.GA20086@wolff.to>
Permalink:  ../20040622175328.GA20086@wolff.to/
Also on:    postgresql.org/message-id/20040622175328.GA20086@wolff.to

 · 

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: bruno@wolff.to, bill@math.uchicago.edu, josh@agliodbs.com
  Subject: Re: postgresql and openmosix migration
  In-Reply-To: <20040622175328.GA20086@wolff.to>

* 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