suppress output for benchmarking

Started by uwcssaalmost 20 years ago5 messages
#1uwcssa
uwcssa@gmail.com

I am testing the performance of postgresql on a set of workloads. However,
the output significantly affects the performance evaluation. Is there a way
to by-pass all output of select statements so the timing reflects only the
query evaluation process?

thanks a lot

#2Jim C. Nasby
jnasby@pervasive.com
In reply to: uwcssa (#1)
Re: suppress output for benchmarking

On Wed, Jan 18, 2006 at 10:35:48PM -0500, uwcssa wrote:

I am testing the performance of postgresql on a set of workloads. However,
the output significantly affects the performance evaluation. Is there a way
to by-pass all output of select statements so the timing reflects only the
query evaluation process?

SELECT count(*) FROM (SELECT ...) a;

If you're using psql \timing will probably be useful as well.

And this is better suited for -general...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

#3Hannu Krosing
hannu@skype.net
In reply to: uwcssa (#1)
Re: suppress output for benchmarking

Ühel kenal päeval, K, 2006-01-18 kell 22:35, kirjutas uwcssa:

I am testing the performance of postgresql on a set of workloads.
However,
the output significantly affects the performance evaluation. Is there
a way
to by-pass all output of select statements so the timing reflects only
the
query evaluation process?

If you do EXPLAIN ANALYSE QUERY instead of just QUERY, then the backend
discards all rows returned and just gives back performance data

-------------------
Hannu

#4Jim C. Nasby
jnasby@pervasive.com
In reply to: Hannu Krosing (#3)
Re: suppress output for benchmarking

On Thu, Jan 19, 2006 at 11:46:29PM +0200, Hannu Krosing wrote:

??hel kenal p??eval, K, 2006-01-18 kell 22:35, kirjutas uwcssa:

I am testing the performance of postgresql on a set of workloads.
However,
the output significantly affects the performance evaluation. Is there
a way
to by-pass all output of select statements so the timing reflects only
the
query evaluation process?

If you do EXPLAIN ANALYSE QUERY instead of just QUERY, then the backend
discards all rows returned and just gives back performance data

The flipside is that EXPLAIN ANALYZE adds it's own (non-trivial)
overhead to the query.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

#5John
xiaoqianjiang@hotmail.com
In reply to: uwcssa (#1)
questions about varlist and Query

Fellow hacker,

I am new comer to postgres development community. Currently, I am
implementing tightly coupled machine classifiers within postgres. The
grammer looks like Train Parameter_list (class1,class2,class3...). I have
two major problems right now.

1. Train is a statement and it is suppose to return some parameters in the
form of a query. (To be used by a classifier later.) How can I return a
Query with self specified column name and data vectors?

2. class1, class2 are all supposed to be relations/query result. But what is
a proper container to hold them. I found var_list to be a good candidate as
it can contain unconstrained number of var_values. But var_values are of
constant types. Can I just add query as a constant? Anyone had this kind of
implementing experience?

Thanks,
John