From: Sven Geisler <sgeisler@aeccom.com>
To: nicky <nicky@valuecare.nl>
Cc: pgsql-performance@postgresql.org
Subject: Re: Speeding up query, Joining 55mil and 43mil records.
Date: Thu, 22 Jun 2006 13:29:41 +0200
Message-ID: <449A7F25.3040607@aeccom.com> (raw)
In-Reply-To: <449A677D.4020504@valuecare.nl>
References: <44994DE7.5070801@valuecare.nl>
<20060621184803.GC93655@pervasive.com>
<449A677D.4020504@valuecare.nl>
Hi Nicky,
Did you tried to create an index to avoid the sequential scans?
Seq Scan on src_faktuur_verrsec t0...
I think, you should try
CREATE INDEX src.src_faktuur_verrsec_codesubstr ON
src.src_faktuur_verrsec (substr(src.src_faktuur_verrsec.code,1,2))
Cheers
Sven.
nicky schrieb:
> Hello again,
>
> thanks for all the quick replies.
>
> It seems i wasn't entirely correct on my previous post, i've mixed up
> some times/numbers.
>
> Below the correct numbers
>
> MSSQL: SELECT COUNT(*) from JOIN (without insert) 17 minutes
> PostgreSQL: SELECT COUNT(*) from JOIN (without insert) 33 minutes
> PostgreSQL: complete query 55 minutes
<snip snip snip>
>
> A lot of improvement also in the select count: 33 minutes vs 10 minutes.
>
>
> To us, the speeds are good. Very happy with the performance increase on
> that select with join, since 90% of the queries are SELECT based.
>
> The query results in 7551616 records, so that's about 4500 inserts per
> second. I'm not sure if that is fast or not. Any further tips would be
> welcome.
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: sgeisler@aeccom.com, nicky@valuecare.nl
Subject: Re: Speeding up query, Joining 55mil and 43mil records.
In-Reply-To: <449A7F25.3040607@aeccom.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