public inbox for [email protected]
help / color / mirror / Atom feedFrom: Karl Czajkowski <[email protected]>
To: Chris Wilson <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Fwd: Slow query from ~7M rows, joined to two tables of ~100 rows each
Date: Mon, 26 Jun 2017 13:32:21 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAOg7f817QD6XpSJD86pVJNLjmE_PtXUGpHOHk7BEr5ELBqV_7g@mail.gmail.com>
References: <CAOg7f817QD6XpSJD86pVJNLjmE_PtXUGpHOHk7BEr5ELBqV_7g@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
On Jun 26, Chris Wilson modulated:
> I created the index starting with date and it did make a big
> difference: down to 10.3 seconds using a bitmap index scan and bitmap
> heap scan (and then two hash joins as before).
>
By the way, what kind of machine are you using? CPU, RAM, backing
storage?
I tried running your original test code and the query completed in
about 8 seconds, and adding the index changes and analyze statement
brought it down to around 2.3 seconds on my workstation with Postgres
9.5.7. On an unrelated development VM with Postgres 9.6.3, the final
form took around 4 seconds.
Karl
--
Sent via pgsql-performance mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Fwd: Slow query from ~7M rows, joined to two tables of ~100 rows each
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox