pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory S. Williamson <gsw@globexplorer.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Cc: PostGIS Users Discussion <postgis-users@postgis.refractions.net>
Subject: Re: [postgis-users] Is my query planner failing me, or vice versa?
Date: Thu, 15 Dec 2005 04:03:16 -0800
Message-ID: <71E37EF6B7DCC1499CEA0316A2568328024BBCDA@loki.wc.globexplorer.net> (raw)

Well, what does the random_page_cost do internally ?

I don't think I'd expect postgres to be able to *do* anything in particular, any more than I would expect it to "do" something about slow disk I/O or having limited cache. But it might be useful to the EXPLAIN ANALYZE in estimating costs of retrieving such data. 

Admittedly, this is not as clear as wanting a sequential scan in preference to indexed reads when there are either very few rows or a huge number, but it strikes me as useful to me the DBA to have this factoid thrust in front of me when considering why a given query is slower than I might like. Perhaps an added time based on this factor and the random_page_cost value, since lots of TOAST data and a high access time would indicate to my (ignorant!) mind that retrieval would be slower, especially over large data sets.

Forgive my ignorance ... obviously I am but a humble user. grin.

G

-----Original Message-----
From:	Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent:	Wed 12/14/2005 9:36 PM
To:	Gregory S. Williamson
Cc:	pgsql-performance@postgresql.org; PostGIS Users Discussion
Subject:	Re: [PERFORM] [postgis-users] Is my query planner failing me, or vice versa? 
"Gregory S. Williamson" <gsw@globexplorer.com> writes:
> Forgive the cross-posting, but I found myself wondering if might not
> be some way future way of telling the planner that a given table
> (column ?) has a high likelyhood of being TOASTed.

What would you expect the planner to do with the information, exactly?

We could certainly cause ANALYZE to record some estimate of this, but
I'm not too clear on what happens after that...

			regards, tom lane

!DSPAM:43a100d6285261205920220!







view thread (5+ messages)  latest in thread

Message-ID: <71E37EF6B7DCC1499CEA0316A2568328024BBCDA@loki.wc.globexplorer.net>
Permalink:  ../71E37EF6B7DCC1499CEA0316A2568328024BBCDA@loki.wc.globexplorer.net/
Also on:    postgresql.org/message-id/71E37EF6B7DCC1499CEA0316A2568328024BBCDA@loki.wc.globexplorer.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: gsw@globexplorer.com, tgl@sss.pgh.pa.us, postgis-users@postgis.refractions.net
  Subject: Re: [postgis-users] Is my query planner failing me, or vice versa?
  In-Reply-To: <71E37EF6B7DCC1499CEA0316A2568328024BBCDA@loki.wc.globexplorer.net>
  References: <71E37EF6B7DCC1499CEA0316A2568328024BBCDA@loki.wc.globexplorer.net>

* 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