Re: text search: tablescan cost for a tsvector - Mailing list pgsql-performance

From Marc Mamin
Subject Re: text search: tablescan cost for a tsvector
Date
Msg-id C4DAC901169B624F933534A26ED7DF3103E91862@JENMAIL01.ad.intershop.net
Whole thread Raw
In response to text search: tablescan cost for a tsvector  ("Marc Mamin" <M.Mamin@intershop.de>)
List pgsql-performance

> Von: Robert Haas [mailto:robertmhaas@gmail.com]
> Gesendet: Mi 2/29/2012 7:32


> On Mon, Feb 6, 2012 at 6:05 AM, Marc Mamin <M.Mamin@intershop.de> wrote:
> > without analyze: http://explain.depesz.com/s/6At
> > with analyze:    http://explain.depesz.com/s/r3B
...
> The problem seems to be that the cost estimator doesn't know that
> detoasting is expensive.

Hello,

Tom Lane has started a follow up thread in the hacker list.
Detoasting is indeed the main obstacle, but I've repeated my test using plain storage
and the planer still choose (systematically?) the slowest query.
It seems that I bumped into 2 different issues at the same time.

http://archives.postgresql.org/pgsql-hackers/2012-02/msg00896.php

Backround:
Our reporting system offers amongst others time histograms
combined with a FTS filtering on error occurences (imported from error logs),
It is hence not unusual that given search terms are found within a majority of the documents...

best regards,

Marc Mamin

pgsql-performance by date:

Previous
From: "Igor Schtein"
Date:
Subject: Performance of SQL Function versus View
Next
From: Lew
Date:
Subject: Re: Very long deletion time on a 200 GB database