Re: Using index name in select Query - Mailing list pgsql-novice

From Kimberly Israel
Subject Re: Using index name in select Query
Date
Msg-id 1382186713.79837.YahooMailNeo@web161604.mail.bf1.yahoo.com
Whole thread Raw
In response to Using index name in select Query  (Naman <naman.bbps@gmail.com>)
List pgsql-novice
I'm not sure what you mean by  using a particular index.
If you want the index to be used to order the records, just add and ORDER BY line to the query:
SELECT * FROM student
ORDER BY index1.


On Saturday, October 19, 2013 8:24 AM, Naman <naman.bbps@gmail.com> wrote:
Hi

I have table student with index built upon it naming  index1 ,index2 so on and so forth.
I want to write a query by which i can force the optimizer to use the specified index.

Somewhat like :
select * from student use index(index1).

Is there any way to achieve this

Regards
Naman


pgsql-novice by date:

Previous
From: Naman
Date:
Subject: Using index name in select Query
Next
From: David Johnston
Date:
Subject: Re: Using index name in select Query