Re: funny view/temp table problem with query

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: funny view/temp table problem with query
Date: 2009-02-27 13:01:13
Message-ID: 2f4958ff0902270501h49030e88u6c0dc9e5377e0292@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 27, 2009 at 11:57 AM, Gregory Stark <stark(at)enterprisedb(dot)com> wrote:

> Uh, we get a lot of really mangled SQL and explain plans -- I don't see
> anything wrong with these. If the question was unclear it sounds like it's
> just because it's a fairly subtle problem and was hard to describe. Needing
> two cracks at describing the problem is pretty much par for the course here.
>
> I haven't tested the query to see what's going on but if the problem is due to
> random() then in 8.4 you could use WITH to guarantee that the subquery is
> executed precisely once and the results reused as-is subsequently.

In that case, actually I need to get a random array of packages that's
different as much as possible for every account-id.
I'll try to create simpler example, with some script that would
generate data for you.

--
GJ

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Linos 2009-02-27 13:04:25 strange performance problem
Previous Message Tim Tassonis 2009-02-27 12:30:59 Standalone ODBC Driver