ryan.a.roemmich@mail.sprint.com writes:
> I am working with putting syslog logs into a database, I'm parsing the
> logs and using the key information for my fields. With my test data of
> ~200K rows the optimizer used my b-tree index that I created for an
> oft-used where clause. When the table grew to over 800K rows the index
> was no longer used. The field in question contains IP addresses, but
> uses varchar. The values are _not_ unique. One particular address has
> 150K entries. How can I keep my where queries speedy?
For 150k out of 800k rows, a sequential scan is definitely the better
choice. If you can prove otherwise, please post data.
For problems with the optimizer in general you should post the schema, the
queries, and the explain output.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter