[PERFORM] Bad query optimizer misestimation because of TOAST tables

2005-02-02 Thread Markus Schaber
[This mail goes as X-Post to both pgsql-perform and postgis-users because postgis users may suffer from this problem, but I would prefer to keep the Discussion on pgsql-performance as it is a general TOAST problem and not specific to PostGIS alone.] Hello, Running PostGIS 0.8.1 under PostgreSQL

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