pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jay Levitt <jay.levitt@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Cost estimate vs. actual - do I care?
Date: Sun, 01 Jan 2012 13:59:25 -0500
Message-ID: <4F00AD0D.6000501@gmail.com> (raw)

I gather that a big part of making queries performant is making sure the 
planner's estimates reflect reality.

Given a random explain analyze line:

Limit  (cost=0.02..943.11 rows=50 width=16) (actual time=0.603..79.729 
rows=50 loops=1)

which is the truer statement?

1. As long as costs go up with actual time, you're fine.

2. You should try to ensure that costs go up linearly with actual time.

3. You should try to ensure that costs are as close as possible to actual time.

4. The number "4".

Jay Levitt



view thread (2+ messages)  latest in thread

Message-ID: <4F00AD0D.6000501@gmail.com>
Permalink:  ../4F00AD0D.6000501@gmail.com/
Also on:    postgresql.org/message-id/4F00AD0D.6000501@gmail.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: jay.levitt@gmail.com
  Subject: Re: Cost estimate vs. actual - do I care?
  In-Reply-To: <4F00AD0D.6000501@gmail.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