Ugh, never mind. I ran ltrace and it's spending 99% of its time in
gettimeofday.
select count(*) from notes;
count
-
1926207
(1 row)
Time: 213.950 ms
explain analyze select count(*) from notes;
QUERY PLAN
Howdy. I'm curious what besides raw hardware speed determines the performance
of a Seq Scan that comes entirely out of shared buffers… I ran the following on
the client's server I'm profiling, which is otherwise idle:
EXPLAIN (ANALYZE ON, BUFFERS ON) SELECT * FROM notes;
Seq Scan on notes (cos
On 21 August 2012 22:08, Tomas Vondra wrote:
> As others already mentioned, the improvements in pg_stat_statements by
> Peter Geoghean in 9.2 is the first thing you should look into I guess.
> Especially if you're looking for per-query stats.
If people would like to know about a better way to mon
On 21.8.2012 20:35, Rick Otten wrote:
> I have a PostgreSQL 9.1 cluster. Each node is serving around 1,000
> queries per second when we are at a ‘steady state’.
>
> What I’d like to know is the average query time. I’d like to see if
> query performance is consistent, or if environmental changes,
On Tue, Aug 21, 2012 at 2:59 PM, Craig James wrote:
> On Tue, Aug 21, 2012 at 1:03 PM, Scott Marlowe
> wrote:
>> That seems unnecessarily complex. how about this:
>>
>> create sequence s;
>> select array_agg (a.b) from (select nextval('s') as b from
>> generate_series(1,1000)) as a;
>>
>> Then
On Tue, Aug 21, 2012 at 1:03 PM, Scott Marlowe wrote:
> That seems unnecessarily complex. how about this:
>
> create sequence s;
> select array_agg (a.b) from (select nextval('s') as b from
> generate_series(1,1000)) as a;
>
> Then you just iterate that array for the ids you need.
For brevity I
Karl,
* Karl Denninger (k...@denninger.net) wrote:
> That looks EXTREMELY useful and I'm looking forward to checking it out
> in 9.2; I have asked a similar question about profiling actual queries
> in the past and basically it came down to "turn on explain or run a
> separate explain yourself sin
On Tue, Aug 21, 2012 at 2:03 PM, Scott Marlowe wrote:
> On Tue, Aug 21, 2012 at 9:32 AM, Craig James wrote:
>> On Mon, Aug 20, 2012 at 5:10 PM, Tom Lane wrote:
>>> Craig James writes:
I want to do this:
>>>
select setval('object_id_seq', nextval('object_id_seq') + 1000, false);
>>
On Tue, Aug 21, 2012 at 9:32 AM, Craig James wrote:
> On Mon, Aug 20, 2012 at 5:10 PM, Tom Lane wrote:
>> Craig James writes:
>>> I want to do this:
>>
>>> select setval('object_id_seq', nextval('object_id_seq') + 1000, false);
>>
>>> Now suppose two processes do this simultaneously. Maybe
On 8/21/2012 1:53 PM, Stephen Frost wrote:
> * Rick Otten (rot...@manta.com) wrote:
>> It seems like we almost have everything we need to track this in the stats
>> tables, but not quite. I was hoping the folks on this list would have some
>> tips on how to get query performance trends over tim
* Rick Otten (rot...@manta.com) wrote:
> It seems like we almost have everything we need to track this in the stats
> tables, but not quite. I was hoping the folks on this list would have some
> tips on how to get query performance trends over time out of each node in my
> cluster.
I'm afraid
I have a PostgreSQL 9.1 cluster. Each node is serving around 1,000 queries per
second when we are at a 'steady state'.
What I'd like to know is the average query time. I'd like to see if query
performance is consistent, or if environmental changes, or code releases, are
causing it to drift, s
On Tue, Aug 21, 2012 at 10:32 AM, Craig James wrote:
> On Mon, Aug 20, 2012 at 5:10 PM, Tom Lane wrote:
>> Craig James writes:
>>> I want to do this:
>>
>>> select setval('object_id_seq', nextval('object_id_seq') + 1000, false);
>>
>>> Now suppose two processes do this simultaneously. Maybe
On Mon, Aug 20, 2012 at 5:10 PM, Tom Lane wrote:
> Craig James writes:
>> I want to do this:
>
>> select setval('object_id_seq', nextval('object_id_seq') + 1000, false);
>
>> Now suppose two processes do this simultaneously. Maybe they're in
>> transactions, maybe they're not. Are they guar
On Mon, Aug 20, 2012 at 6:06 PM, Scott Marlowe wrote:
> On Mon, Aug 20, 2012 at 6:59 PM, Scott Marlowe
> wrote:
>> On Mon, Aug 20, 2012 at 6:10 PM, Tom Lane wrote:
>>> Craig James writes:
I want to do this:
>>>
select setval('object_id_seq', nextval('object_id_seq') + 1000, false
On Tue, Aug 21, 2012 at 2:45 AM, Scott Marlowe wrote:
> sometimes I hate my laptops touchpad. Ran something similar in php
> got similar performance. By comparison, running select 1 instead of
> nextval() took ~0.160s to run.
you're mostly measuring client overhead i think:
postgres=# explain
On Tue, Aug 21, 2012 at 1:41 AM, Scott Marlowe wrote:
> On Mon, Aug 20, 2012 at 7:06 PM, Scott Marlowe
> wrote:
>> On Mon, Aug 20, 2012 at 6:59 PM, Scott Marlowe
>> wrote:
>>> On Mon, Aug 20, 2012 at 6:10 PM, Tom Lane wrote:
Craig James writes:
> I want to do this:
> se
On Mon, Aug 20, 2012 at 7:06 PM, Scott Marlowe wrote:
> On Mon, Aug 20, 2012 at 6:59 PM, Scott Marlowe
> wrote:
>> On Mon, Aug 20, 2012 at 6:10 PM, Tom Lane wrote:
>>> Craig James writes:
I want to do this:
>>>
select setval('object_id_seq', nextval('object_id_seq') + 1000, false
18 matches
Mail list logo