Re: [PERFORM] Bad query optimizer misestimation because of TOAST

2005-02-07 Thread Markus Schaber
Hi, Tom, Tom Lane schrieb: Markus Schaber [EMAIL PROTECTED] writes: [Query optimizer misestimation using lossy GIST on TOASTed columns] What I would be inclined to do is to extend ANALYZE to make an estimate of the extent of toasting of every toastable column, and then modify cost_qual_eval

Re: [PERFORM] Bad query optimizer misestimation because of TOAST tables

2005-02-02 Thread Tom Lane
Markus Schaber [EMAIL PROTECTED] writes: IMHO, this tells the reason. The query planner has a table size of 3 pages, which clearly is a case for a seqscan. But during the seqscan, the database has to fetch an additional amount of 8225 toast pages and 127 toast index pages, and rebuild the

Re: [PERFORM] Bad query optimizer misestimation because of TOAST

2005-02-02 Thread Markus Schaber
Hi, Tom, Tom Lane schrieb: IMHO, this tells the reason. The query planner has a table size of 3 pages, which clearly is a case for a seqscan. But during the seqscan, the database has to fetch an additional amount of 8225 toast pages and 127 toast index pages, and rebuild the geometries contained

Re: [PERFORM] Bad query optimizer misestimation because of TOAST

2005-02-02 Thread Tom Lane
Markus Schaber [EMAIL PROTECTED] writes: Tom Lane schrieb: I don't buy this analysis at all. The toasted columns are not those in the index (because we don't support out-of-line-toasted index entries), so a WHERE clause that only touches indexed columns isn't going to need to fetch anything