Re: not exactly a bug report, but surprising behaviour - Mailing list pgsql-general

From Tom Lane
Subject Re: not exactly a bug report, but surprising behaviour
Date
Msg-id 22981.1044430472@sss.pgh.pa.us
Whole thread Raw
In response to Re: not exactly a bug report, but surprising behaviour  (Greg Stark <gsstark@mit.edu>)
Responses Re: not exactly a bug report, but surprising behaviour
List pgsql-general
Greg Stark <gsstark@mit.edu> writes:
> I'm watching this query I'm working on now drive the cpu to 100% for 6+ hours
> with virtually no I/O. And I think it's the best I can do. All the times is
> being spent moving bits around from one place to another.

It would be interesting to see a gprof profile of that.

> It occurs to me that it's possible postgres is doing this already at a lower
> level of abstraction.

Yes, tuplesort.c has heard of pushing pointers around rather than
copying records.  I wonder though whether data is being pushed out to
kernel disk buffers and then back in again --- do you have sort_mem
set large enough?  Another likely theory is that the interface layers
needed to access datatype-specific comparison routines are chewing the
cycles.  Need facts not speculation to know where the bottleneck is...

            regards, tom lane

pgsql-general by date:

Previous
From: John Smith
Date:
Subject: Re: UPDATE slow
Next
From: Tom Lane
Date:
Subject: Re: UPDATE slow