Tom,Why are the rowcount estimates so far off? Maybe you need to increase the statistics target for this table. regards, tom lane
| stats target | 
      sampled | 
      query duration after analyze | 
    
| 10 | 
      3000 | 
      80600ms | 
    
| 15 | 
      4500 | 
      64000ms | 
| 20 | 
      6000 | 
      4.2ms | 
    
| 30 | 
      9000 | 
      4.2ms | 
    
| 250 | 
      75000 | 
      4.2ms | 
    
| 500 | 
      ? | 
      4.2ms | 
    
| 1000 | 
      300000 | 
      4.2ms |