Re: Problem with query plan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Cott Lang <cott(at)internetstaff(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with query plan
Date: 2004-10-22 21:19:05
Message-ID: 18999.1098479945@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Cott Lang <cott(at)internetstaff(dot)com> writes:
> sort_mem = 8192
> random_page_cost = 2
> effective_cache_size = 3932160

effective_cache_size 30Gb ? Seems a tad high ;-)

However, I set up a dummy test case on 7.4.5 and don't see any overflow.

regression=# create table z1(f1 char(1253));
CREATE TABLE
regression=# update pg_class set reltuples=2023865, relpages=65000 where relname = 'z1';
UPDATE 1
regression=# set sort_mem = 8192;
SET
regression=# set random_page_cost = 2;
SET
regression=# set effective_cache_size = 3932160;
SET
regression=# explain select * from z1 order by f1;
QUERY PLAN
---------------------------------------------------------------------
Sort (cost=2200533.17..2205592.83 rows=2023865 width=1257)
Sort Key: f1
-> Seq Scan on z1 (cost=0.00..85238.65 rows=2023865 width=1257)
(3 rows)

Can you try this exact test case and see if you get a NAN?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Barnard 2004-10-22 21:32:14 Re: Two questions from the boss (SQL:2003 && scalability)
Previous Message Gaetano Mendola 2004-10-22 21:01:35 Re: Slony-I 1.0.4 Released