pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: tjo@acm.org
To: pgsql-sql@postgresql.org
Subject: Re: testing/predicting optimization using indexes
Date: Wed, 26 Jan 2005 22:45:19 +0100
Message-ID: <opsk8b1tmpth1vuj@musicbox> (raw)
In-Reply-To: <41F1A387.5040402@acm.org>
References: <41F1A387.5040402@acm.org>


> I'm quite happy with the speedup in 3, but puzzled over the slowdown in  
> 2.
	Could you provide :

	- SELECT count(*) FROM structure;
	=> NRows
	- SELECT avg(length(smiles)) FROM structure;

	Then VACUUM FULL ANALYZE structure
	Redo your timings and this time post EXPLAIN ANALYZE

	Also your query returns 1313 rows, so wan you post :

EXPLAIN ANALYZE SELECT oe_matches(smiles,'c1ccccc1CC(=O)NC') FROM  
structure;
=> time T1
EXPLAIN ANALYZE SELECT smiles FROM structure;
=> time T2

(T1-T2)/(NRows) will give you an estimate of the time spent in each  
oe_matches call.

	Also note that for postgres (a,b) > (c,d) means ((a>c) and (b>d)), which  
can be misleading, but I think that's what you wanted.



view thread (4+ messages)  latest in thread

Message-ID: <opsk8b1tmpth1vuj@musicbox>
Permalink:  ../opsk8b1tmpth1vuj@musicbox/
Also on:    postgresql.org/message-id/opsk8b1tmpth1vuj@musicbox

 · 

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-sql@postgresql.org
  Cc: lists@boutiquenumerique.com, tjo@acm.org
  Subject: Re: testing/predicting optimization using indexes
  In-Reply-To: <opsk8b1tmpth1vuj@musicbox>

* 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