On Tuesday 11 October 2005 01:50, Jim C. Nasby wrote: > What's the datatype on naamvrouw? Notice that it's being casted to text, > which means an index on that column won't be used. > Datatype is text. My problem is that I want it to use the date of birth index. I've increased the statistics to 1000, and only occasionally, because of the very uneven distribution of surnames, the planner does the wrong thing. (Thinking that only 14 rows will match 'blaa' instead of 767.) I've tried to set an even higher limit, but 1000 seems to be the maximum. Is this hardcoded, or can I set a higher maximum somewhere ? If the only penalty is slower analyzing, I don't care: we analyze at night when these system are idle. Cheers, Han Holl ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org