Re: Question about PostgreSQL from Delphi newsgroups

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Tony Caduto" <tony_caduto(at)amsoftwaredesign(dot)com>
Cc: "Postgres General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question about PostgreSQL from Delphi newsgroups
Date: 2007-11-15 22:31:56
Message-ID: dcc563d10711151431p38932a41y28ddf83b64d16632@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Nov 15, 2007 3:00 PM, Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> wrote:
> Hi,
> Someone asked me a question about PostgreSQL on the Delphi newsgroups
> and I was not sure how to answer them:
>
> "Do you know if using PostgreSQL a query or connection can have a
> priority set, so it can run quicker than other queries?
> For example, in a POS system the reporting queries should have lower
> priority than the generated invoices insert queries. "

The answer is Yes, No, and sort of.

It is possible to set different priorities on various backend
processes by means things like renice etc... There are issues of
priority inversion (look it up on wikipedia) that may or may not
affect you, and changing the priority may or may not help, because in
most OSes process priority does not translate to I/O priority, which
is usually the real underlying issue.

My recommendation is that if you want to have a live fast
transactional database, AND you want to run reports, then you should
something like slony replication and run your reports against the
slave server. It certainly works well for me.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2007-11-15 22:40:33 Re: Tom thinks it's bad code was 8.3 vs 8.2 sql compatibility issue
Previous Message Willem Buitendyk 2007-11-15 22:25:14 Windows Installer Problems/Stall Solution Error 2769