Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> that is the explain for the 4h+ Q9:
> http://www.kaltenbrunner.cc/files/analyze_q9.txt
The big problem there seems to be the drastic misestimation of the
number of rows matching the p_name ~~ '%ghost%' condition. What does
pg_stats have for the p_name column?
regards, tom lane