On Mon, Jun 20, 2011 at 8:38 AM, Sushant Sinha <sushant354@gmail.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