Re: Database slowness -- my design, hardware, or both? - Mailing list pgsql-general

From Tom Lane
Subject Re: Database slowness -- my design, hardware, or both?
Date
Msg-id 26820.1173157457@sss.pgh.pa.us
Whole thread Raw
In response to Database slowness -- my design, hardware, or both?  ("Reuven M. Lerner" <reuven@lerner.co.il>)
Responses Re: Database slowness -- my design, hardware, or both?
List pgsql-general
"Reuven M. Lerner" <reuven@lerner.co.il> writes:
> Hi, everyone.  I've been using PostgreSQL for a decade, and it hasn't
> failed me yet.  But I've been having some serious performance problems
> on a database that I've been using in my grad-school research group, and
> it's clear that I need help from some more experienced hands.

What PG version are you using?

> In theory, this would be the way to go.  In practice, every step has
> become a performance nightmare, taking many more hours than I might have
> hoped or expected.  For example, I've got a Pl/PgSQL function that goes
> through each variable-assignment row, and UPDATEs is previous_value
> column with whatever the previous value might have been.

I'd try to think of a way to eliminate the function altogether in favor
of a single UPDATE command.  In general, row-at-a-time thinking isn't
the way to win in SQL.

            regards, tom lane

pgsql-general by date:

Previous
From: "Reuven M. Lerner"
Date:
Subject: (no subject)
Next
From: "Reuven M. Lerner"
Date:
Subject: Re: Database slowness -- my design, hardware, or both?