pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Jesper Krogh <jesper@krogh.cc>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Rauan Maemirov <rauan@maemirov.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-performance@postgresql.org
Subject: Re: Problems with FTS
Date: Thu, 01 Dec 2011 07:11:40 +0100
Message-ID: <4ED71A9C.5030603@krogh.cc> (raw )
In-Reply-To: <CA+Tgmoaqy-O9OWYnO-Xc0ei_mytB6C2rMAarjwuM+581TGRaLA@mail.gmail.com >
References: <4D0CA1890200002500038774@gw.wicourts.gov >
<AANLkTim4vLhMB5Ty6hTN4XdNoJP0BWYxguqEXt0+r920@mail.gmail.com >
<AANLkTinAKawNNfs8VKpqrCJzyfn=EQQh=6XqcF4iy4ur@mail.gmail.com >
<CAFw_bqOdQqE0fUVntCX-aV+oZnzEgpmGqce=ODktJkNktFEEBQ@mail.gmail.com >
<CA+Tgmoaqy-O9OWYnO-Xc0ei_mytB6C2rMAarjwuM+581TGRaLA@mail.gmail.com >
On 2011-11-30 21:58, Robert Haas wrote:
> The row-count estimates look reasonably accurate, so there's some
> other problem here. What do you have random_page_cost, seq_page_cost,
> and effective_cache_size set to? You might try "SET
> random_page_cost=2" or even "SET random_page_cost=0.5; SET
> seq_page_cost=0.3" and see if those settings help
I may be seing ghosts here, since I've encountered
the same problem. But the Query-planner does not
take toast into account, so a Sequential Scan + filter
only cost what it takes to scan the main table, but fts-fields
are typically large enough to be toasted so the cost should
be main+toast (amount of pages) + filtering cost.
I posted about it yesterday:
http://archives.postgresql.org/pgsql-hackers/2011-11/msg01754.php
If above problem is on <9.1 a patch to proper account of gin-estimates
have been added to 9.1 which also may benefit the planning:
http://www.postgresql.org/docs/9.1/static/release-9-1.html
Improve GIN index scan cost estimation (Teodor Sigaev)
Jesper
--
Jesper
view thread (7+ messages)
Message-ID: <4ED71A9C.5030603@krogh.cc>
Permalink: ../4ED71A9C.5030603@krogh.cc/
Also on: postgresql.org/message-id/4ED71A9C.5030603@krogh.cc
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: jesper@krogh.cc, robertmhaas@gmail.com, rauan@maemirov.com, Kevin.Grittner@wicourts.gov
Subject: Re: Problems with FTS
In-Reply-To: <4ED71A9C.5030603@krogh.cc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox