| From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> | 
|---|---|
| To: | sushant354(at)gmail(dot)com | 
| Cc: | pgsql-performance(at)postgresql(dot)org | 
| Subject: | Re: sequential scan unduly favored over text search gin index | 
| Date: | 2011-06-30 03:41:53 | 
| Message-ID: | BANLkTikV-ZS32=usm-9sHf=fN+RK7jZhjA@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-performance | 
On Mon, Jun 20, 2011 at 8:38 AM, Sushant Sinha <sushant354(at)gmail(dot)com> wrote:
>
> postgres version 9.0.2
> statistics on docvector is set to 10000 and as you can see the row
> estimates are fine.
>
> lawdb=# \d docmeta1
>       Table "public.docmeta1"
>   Column    |   Type    | Modifiers
> -------------+-----------+-----------
>  tid         | integer   | not null
>  docweight   | integer   |
>  doctype     | integer   |
>  publishdate | date      |
>  covertids   | integer[] |
>  titlevector | tsvector  |
>  docvector   | tsvector  |
> Indexes:
>    "docmeta1_pkey" PRIMARY KEY, btree (tid)
>    "docmeta1_date_idx" btree (publishdate)
>    "docmeta1_docvector_idx" gin (docvector)
>    "docmeta1_title_idx" gin (titlevector)
>
> lawdb=# SELECT relpages, reltuples FROM pg_class WHERE relname
> ='docmeta1';
> relpages | reltuples
> ----------+-----------
>    18951 |    329940
What the are sizes of associated toast tables for the tsvector columns?
>
> lawdb=# explain analyze select * from docmeta1 where docvector @@
> plainto_tsquery('english', 'free');
It would be nice to see the results of explain (analyze, buffers).
Cheers,
Jeff
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Janes | 2011-06-30 03:59:25 | Re: sequential scan unduly favored over text search gin index | 
| Previous Message | Shaun Thomas | 2011-06-29 19:38:24 | Re: is parallel union all possible over dblink? |