> > These numbers don't make much sense to me. It seems like 5% is about as slow > > as reading the whole file which is even worse than I expected. I thought I > > was > > being a bit pessimistic to think reading 5% would be as slow as reading 20% > > of > > the table.
I have a theory. My test program, like Postgres, is reading in 8k chunks. Perhaps that's fooling Linux into thinking it's a sequential read and reading in 32k chunks internally. That would effectively make a 25% scan a full table scan. And a 5% scan would be a 20% scan which is about where I would have expected the breakeven point to be. -- greg ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match