pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Henrik Zagerholm <henke@mac.se>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [PERFORM] Planner making wrong decisions 8.2.4. Insane cost calculations.
Date: Mon, 06 Aug 2007 14:07:17 +0100
Message-ID: <87abt4n75m.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <0C963119-103A-4EB1-B9D8-0FD3E16A11F0@mac.se>
References: <0C963119-103A-4EB1-B9D8-0FD3E16A11F0@mac.se>

"Henrik Zagerholm" <henke@mac.se> writes:

> Hi list,
>
> I'm having a weird acting query which simply retrieves some files stored in a db
> which are related to a specific archive and also has a  size lower than 1024
> bytes.
> Explain analyze below. The first one is with seq-scan enabled and the other one
> with seq-scans disabled. The weird thing is the seq scan on  tbl_file_structure
> and also the insane calculated cost of 100 000 000  on  some tables.

Well the way Postgres disables a plan node type is by giving it a cost of
100,000,000. What other way did you expect it to be able to scan
tbl_filetype_suffix anyways? What indexes do you have on tbl_filetype_suffix?

And any chance you could resend this stuff without the word-wrapping?
It's pretty hard to read like this:

"                                      ->  Seq Scan on tbl_filetype_suffix
(cost=100000000.00..100000001.34 rows=14  width=8) (actual time=0.133..0.176
rows=14 loops=1)"
"                                            Filter: (filetype_suffix_index IS
TRUE)"


-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com




view thread (7+ messages)  latest in thread

Message-ID: <87abt4n75m.fsf@oxford.xeocode.com>
Permalink:  ../87abt4n75m.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/87abt4n75m.fsf@oxford.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: stark@enterprisedb.com, henke@mac.se, pgsql-general@postgresql.org
  Subject: Re: [PERFORM] Planner making wrong decisions 8.2.4. Insane cost calculations.
  In-Reply-To: <87abt4n75m.fsf@oxford.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox