Re: select query not using index

From: <vivek(at)staff(dot)ownmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: select query not using index
Date: 2006-12-03 10:53:30
Message-ID: 200612031053.kB3ArUof018173@mail009.ownmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes , that was the case indeed. I disabled seq scan and it used the index. And the cost was higher than seq scan.

Thanks a lot for all your replies.

With warm regards.

Vivek J. Joshi.

vivek(at)staff(dot)ownmail(dot)com
Trikon Electronics Pvt. Ltd.

All science is either physics or stamp collecting.
-- Ernest Rutherford

A. Kretschmer wrote:
> >am Sat, dem 02.12.2006, um 16:35:47 +0530 mailte vivek(at)staff(dot)ownmail(dot)com
folgendes:
>>
>> The index was created before the table was populated. There are 3 rows
>> in the table for 3 different users. Now when I do a
>
>In this case, with only 3 rows, it is much cheaper to do a seq-scan
>instead a index-scan, because a index-scan must read the index first and
>then the table. And in your case, with only 3 rows, the engine needs
>only one page to read.
>
>
>
>Andreas
>--
>Andreas Kretschmer
>Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
>GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster

Browse pgsql-general by date

  From Date Subject
Next Message Michael Guyver 2006-12-03 13:52:06 Re: Concatenate performance question
Previous Message Andrus 2006-12-03 09:40:05 How to use different lc_collate nad lc_ctype settings.