Martijn van Oosterhout <kleptog@svana.org> writes:
> I'm not sure how common this is (long runs in a foreign key column) and it's
> probably not worth it in the general case. So, is there a column in
> pg_statistic where I can twiddle the per-tuple index-scan cost?
You could stick a phony value into the correlation datum.
> I suppose it's unlikely that there will be a VACUUM ANALYZE EVERYTHING?
The current code wants to see sorted samples. You could feed it a
complete sorted input for moderate-sized tables, but this doesn't
sound like a recipe that scales...
> We'd get better results with partial indexes anyway I think.
I'd like to see the partial-index support cranked up again, for sure.
But how does that solve your problem? I don't see the connection.
regards, tom lane