Re: [PERFORM] Problems with FTS

2011-11-30 Thread Jesper Krogh
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

Re: [PERFORM] Problems with FTS

2011-11-30 Thread Robert Haas
On Mon, Nov 21, 2011 at 12:53 AM, Rauan Maemirov wrote: > The problem has returned back, and here's the results, as you've said it's > faster now: > > SET enable_seqscan=off; > EXPLAIN ANALYZE SELECT "v"."id", "v"."title" FROM "video" AS "v" > WHERE (v.active) AND (v.fts @@ > 'dexter:A|season:A|se

Re: [PERFORM] Problems with FTS

2011-11-20 Thread Rauan Maemirov
The problem has returned back, and here's the results, as you've said it's faster now: SET enable_seqscan=off; EXPLAIN ANALYZE SELECT "v"."id", "v"."title" FROM "video" AS "v" WHERE (v.active) AND (v.fts @@ 'dexter:A|season:A|seri:A|декстер:A|качество:A|сезон:A|серия:A'::tsquery and v.id <> 500563

Re: [PERFORM] Problems with FTS

2011-01-14 Thread Robert Haas
On Tue, Jan 11, 2011 at 3:16 AM, Rauan Maemirov wrote: > Hi, Kevin. > Sorry for long delay. > EXPLAIN ANALYZE SELECT "v"."id", "v"."title" FROM "video" AS "v" > WHERE (v.active) AND (v.fts @@ > 'dexter:A|season:A|seri:A|декстер:A|качество:A|сезон:A|серия:A'::tsquery and > v.id <> 500563 ) > ORDER

Re: [PERFORM] Problems with FTS

2011-01-11 Thread Rauan Maemirov
Hi, Kevin. Sorry for long delay. EXPLAIN ANALYZE SELECT "v"."id", "v"."title" FROM "video" AS "v" WHERE (v.active) AND (v.fts @@ 'dexter:A|season:A|seri:A|декстер:A|качество:A|сезон:A|серия:A'::tsquery and v.id <> 500563 ) ORDER BY COALESCE(ts_rank_cd( '{0.1, 0.2, 0.7, 1.0}', v.fts, 'dexter:A|sea

Re: [PERFORM] Problems with FTS

2010-12-18 Thread Kevin Grittner
Rauan Maemirov wrote: > EXPLAIN SELECT [...] Please show us the results of EXPLAIN ANALYZE SELECT ... Also, please show us the table layout (including indexes), and details about your hardware and PostgreSQL configuration. See this page for details: http://wiki.postgresql.org/wiki/SlowQue

[PERFORM] Problems with FTS

2010-12-15 Thread Rauan Maemirov
Hi, all. I'm trying to query table: EXPLAIN SELECT "v"."id", "v"."title" FROM "video" AS "v" WHERE (v.active) (v.fts @@ 'dexter:A|season:A|seri:A|декстер:A|качество:A|сезон:A|серия:A'::tsquery and v.id <> 500563 ) ORDER BY COALESCE(ts_rank_cd( '{0.1, 0.2, 0.7, 1.0}', v.fts, 'dexter:A|season:A|seri