han.holl@xxxxxxxxxxxxxxxxxxxx writes: > I've increased the statistics to 1000, and only occasionally, because of the > very uneven distribution of surnames, the planner does the wrong thing. > 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 ? You'd have to change the source code, but it's a simple tweak in the ALTER SET STATISTICS code. > If the only penalty is slower analyzing, I don't care: we analyze at night > when these system are idle. You'd be wrong about that --- the planner operations that use the data would necessarily be slower, too. I don't have any concrete information about how much slower, but I'd be hesitant to raise the figure much beyond 1000 ... However, if you can show you have a real-world case that benefits, I'd be willing to think about raising the wired-in limit to 10000 or so. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly