On 30 Apr 2004 at 8:32, Jeff wrote:
> 
>   A better comparision query may be a simple "select a from mytable 
> where a between foo and bar"  to get an index scan.  In that case its a 
> straight up, vanilla index scan.  Nothing else getting in the way.
> 

Yes, you're right and I have done this just to prove to myself that it is the index 
scan that 
is the bottleneck. I have some complex SQL that executes very quickly with Postgres, 
similar to MSSQL, but the index scans in most of those only touch a few rows for a few 
loops. It seems to be a problem when the index scan is scanning very many rows and 
for each of these it has to go to the table just to find out if the index it just 
looked at is 
still valid.

Gary.


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to