Hi,
I have a table in Postgres like:
CREATE TABLE test
(
id integer,
dtstamp timestamp without time zone,
rating real
)
CREATE INDEX test_all
ON test
USING btree
(id , dtstamp , rating);
My db has around 200M rows and I have reduced my test select statement down
to:
SELECT count(1) FR
On Wed, Feb 1, 2012 at 11:10 AM, Gudmundur Johannesson
wrote:
> Hi,
>
> I have a table in Postgres like:
> CREATE TABLE test
> (
> id integer,
> dtstamp timestamp without time zone,
> rating real
> )
> CREATE INDEX test_all
> ON test
> USING btree
> (id , dtstamp , rating);
>
> My db h
Final update on this thread: since it is only necessary for me to get a
rough ratio of the distribution (and not the absolute count), I refactored
the query to include a subquery that samples from the moments table
thus: SELECT moment_id, block_id FROM moments WHERE inserted BETWEEN
'yesterday' AND
On Wed, Feb 1, 2012 at 10:10 AM, Gudmundur Johannesson
wrote:
> Hi,
>
> I have a table in Postgres like:
> CREATE TABLE test
> (
> id integer,
> dtstamp timestamp without time zone,
> rating real
> )
> CREATE INDEX test_all
> ON test
> USING btree
> (id , dtstamp , rating);
>
> My db h
On Wed, Feb 1, 2012 at 11:19 AM, Alessandro Gagliardi
wrote:
> Final update on this thread: since it is only necessary for me to get a
> rough ratio of the distribution (and not the absolute count), I refactored
> the query to include a subquery that samples from the moments table
> thus: SELECT m
LIMIT 65536; Total query runtime: 14846 ms. -
http://explain.depesz.com/s/I3E
LIMIT 69632: Total query runtime: 80141 ms. -
http://explain.depesz.com/s/9hp
So it looks like when the limit crosses a certain threshold (somewhere
north of 2^16), Postgres decides to do a Seq Scan instead of an Index S
On Wed, Feb 1, 2012 at 11:48 AM, Alessandro Gagliardi
wrote:
> LIMIT 65536; Total query runtime: 14846 ms.
> - http://explain.depesz.com/s/I3E
> LIMIT 69632: Total query runtime: 80141 ms.
> - http://explain.depesz.com/s/9hp
>
> So it looks like when the limit crosses a certain threshold (somewher
Possibly. What does
psql > show work_mem;
say?
Bob Lunney
From: Alessandro Gagliardi
To: pgsql-performance@postgresql.org
Sent: Wednesday, February 1, 2012 12:19 PM
Subject: Re: [PERFORM] From Simple to Complex
Final update on this thread: since it is
On Wed, Feb 1, 2012 at 11:04 AM, Bob Lunney wrote:
> Possibly. What does
>
> psql > show work_mem;
>
> say?
>
> 100MB
On Wed, Feb 1, 2012 at 12:50 PM, Gudmundur Johannesson
wrote:
> Here are the answers to your questions:
> 1) I change the select statement so I am refering to 1 day at a time. In
> that case the response time is similar. Basically, the data is not in cache
> when I do that and the response time
10 matches
Mail list logo