Re: [SQL] testing/predicting optimization using indexes

2005-01-26 Thread PFC
Finally, I built the table with all the additional columns created during the initial creation of the table. The original speed was obtained! Quite strange ! Did you vacuum full ? analyze ? Did you set a default value for the columns ? mmm maybe it's not the fact of adding the columns,

Re: [SQL] testing/predicting optimization using indexes

2005-01-26 Thread TJ O'Donnell
I was puzzled as to why my search slowed down when I added columns. The VACUUM did not restore the former speed, which I had obtained before adding the columns. So, I rebuilt the table with only the smiles column and my original speed was again obtained (not surprising). After I added the extra col

Re: [SQL] testing/predicting optimization using indexes

2005-01-26 Thread PFC
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 tim

[SQL] testing/predicting optimization using indexes

2005-01-21 Thread TJ O'Donnell
I have several questions reagaring the kind of increase in speed I can expect when I use a multi-column index. Here's what I've done so far. I've written some search functions which operate on character varying data used to represent molecular structures. We call this a Smiles string. I want to op