From: Jan Kesten <jan.kesten@web.de>
To: pgsql-performance@postgresql.org
Subject: Re: Improving performance on multicolumn query
Date: Wed, 09 Nov 2005 18:31:03 +0100
Message-ID: <43723257.5060804@web.de> (raw)
In-Reply-To: <20051109124429.GA9127@uio.no>
References: <4371E6A7.50808@web.de>
<20051109124429.GA9127@uio.no>
Hi all!
First thanks to any answer by now :-)
> You don't post your table definitions (please do), but it looks like
> test_b, test_c, test_d and test_e might be bigints? If so, you may
> want to do explicit "AND test_b=1::bigint AND test_c=2::bigint" etc.
> -- 7.4 doesn't figure this out for you. (8.0 and higher does.)
I didn't post table defintion, but you all are right, test_a to test_e
are all bigint. I use JDBC to connect to this database and use a
prepared statment for the queries and set all parameters with
pst.setLong() method. Perhaps this could be the problem? I'll try
'normal' statements with typecasting, because as far as I can see, the
query is the problem (postgresql takes more than 98% cpu while running
these statements) or the overhead produced (but not the network, as it
has only 1-2% load). Quering other tables (not as big - both rows and
columns are much less) run quite fast with the same code.
So, thanks again - I'll try and report :-) Can't be so slow, I have some
self-build database with millions of rows and they run very fast - but
they don't use bigint ;-)
Cheers,
Jan
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: jan.kesten@web.de
Subject: Re: Improving performance on multicolumn query
In-Reply-To: <43723257.5060804@web.de>
* 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