Re: testing/predicting optimization using indexes

From: PFC <lists(at)boutiquenumerique(dot)com>
To: tjo(at)acm(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: testing/predicting optimization using indexes
Date: 2005-01-26 21:45:19
Message-ID: opsk8b1tmpth1vuj@musicbox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Hammond 2005-01-26 22:15:43 Re: same question little different test MSSQL vrs Postgres
Previous Message Bruno Wolff III 2005-01-26 21:04:50 Re: same question little different test MSSQL vrs Postgres