Re: testing/predicting optimization using indexes - Mailing list pgsql-sql

From PFC
Subject Re: testing/predicting optimization using indexes
Date
Msg-id opsk8b1tmpth1vuj@musicbox
Whole thread Raw
In response to testing/predicting optimization using indexes  (TJ O'Donnell <tjo@acm.org>)
Responses Re: testing/predicting optimization using indexes  (TJ O'Donnell <tjo@acm.org>)
List 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 structureRedo 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.


pgsql-sql by date:

Previous
From: Dennis Sacks
Date:
Subject: Re: same question little different test MSSQL vrs Postgres
Next
From: Andrew Hammond
Date:
Subject: Re: same question little different test MSSQL vrs Postgres