pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Extrapolating performance expectation
Date: Sun, 17 May 2009 22:04:46 -0600
Message-ID: <5c4ddc540905172104t1a91b829tc2848798a31df886@mail.gmail.com> (raw)

Can one extrapolate future performance expectations for ever-growing tables
from a given (non-trivial) data set, and if so with what curve?  Corollary:
what would one expect a performance curve to approximate in terms of query
execution time v. number of data rows (hardware, load staying constant).

I have user and group information on system usage.  I would like to be able
to do year-to-date counts per user given a single group id but in the data
for one business quarter the query is taking in between 10 and 60+  seconds
depending on both on the size of the group and the group's total usage.
Groups typically have 10-100 users and consume 20K - 80K records in a 9M
record data set.  Group id column is indexed, but it is not the primary
index.  (Sad note: two pseudo groups account for 50 percent of the total
records IIRC (and will never be used for the usage-by-group query below)

This is a single table query:

select user_id, element_type, count(*)
from dataset
where group_id = N
group by user_id, element_type
order by user_id, element_type

Is this the sort of situation which might benefit from increasing the number
of histogram bins (alter table alter column statistics (N>10))?

Any and all pointers appreciated,

view thread (2+ messages)  latest in thread

Message-ID: <5c4ddc540905172104t1a91b829tc2848798a31df886@mail.gmail.com>
Permalink:  ../5c4ddc540905172104t1a91b829tc2848798a31df886@mail.gmail.com/
Also on:    postgresql.org/message-id/5c4ddc540905172104t1a91b829tc2848798a31df886@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-sql@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: Extrapolating performance expectation
  In-Reply-To: <5c4ddc540905172104t1a91b829tc2848798a31df886@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