Обсуждение: Question about PostgreSQL from Delphi newsgroups

Поиск
Список
Период
Сортировка

Question about PostgreSQL from Delphi newsgroups

От
Tony Caduto
Дата:
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. "



Thanks,

Tony

Re: Question about PostgreSQL from Delphi newsgroups

От
"Joshua D. Drake"
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 15 Nov 2007 15:00:00 -0600
Tony Caduto <tony_caduto@amsoftwaredesign.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?

No.

Sincerely,

Joshua D. Drake



- -- 

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997  http://www.commandprompt.com/
            UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHPLRpATb/zqfZUUQRAhgvAKCQRV/COH2nndgcRyXHNQbCq4fc3QCdFt9N
t4Ktz4sjLBdhDdB+A6kjlhM=
=oP+E
-----END PGP SIGNATURE-----

Re: Question about PostgreSQL from Delphi newsgroups

От
Andrew Sullivan
Дата:
On Thu, Nov 15, 2007 at 03:00:00PM -0600, Tony Caduto wrote:
>
> "Do you know if using PostgreSQL a query or connection can have a
> priority set, so it can run quicker than other queries?

No, it can't.  The archives contain a lot of discussion about this issue.
Look in -performance first, I think.

A

--
Andrew Sullivan
Old sigs will return after re-constitution of blue smoke

Re: Question about PostgreSQL from Delphi newsgroups

От
"Scott Marlowe"
Дата:
On Nov 15, 2007 3:00 PM, Tony Caduto <tony_caduto@amsoftwaredesign.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.