Re: How to raise index points when equal and like is used with gist ?

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Condor <condor(at)stz-bg(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to raise index points when equal and like is used with gist ?
Date: 2012-10-12 08:30:41
Message-ID: CAL_0b1sZj5ge5j1cPN=YTuzFMdc10vF8uGFAQJqddJUMwSKfXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 12, 2012 at 1:20 AM, Condor <condor(at)stz-bg(dot)com> wrote:
> Even without tel filed result and type of scan is the same (Seq Scan).

This is because your table has to few rows and it is easier to seq
scan. Add more rows, eg. 100 000, then ANALYZE the table and run
tests. Use random() and generate_series() to generate the data.

>
> Now first name is write in cyrillic and mean "GREG" (I replace it with
> CP1251 CHARS HERE, because some ppl did not have cyrillic encoding). When I
> run the same query on the same database but different table that give
> strange result Bitmap Heap Scan. Index field is the same like test table
> from pastebin, no difference.
>
>
> And here I must say the history of the table. That table was made on psql
> 7.3 version and migrate on every major upgrade of the server that require
> dump/restore of database if that information is valuable.
>
> Any one has ideas what is going wrong on that table ? Why the same query on
> two different table with the same data gives me different scan results ?
>
> Regards,
>
> C
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

--
Sergey Konoplev

a database and software architect
http://www.linkedin.com/in/grayhemp

Jabber: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp Phone: +14158679984

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2012-10-12 09:10:40 Re: Limit+Offset query wrong result in Postgres 9.0.3 ?
Previous Message Condor 2012-10-12 08:20:30 Re: How to raise index points when equal and like is used with gist ?