Re: Using index name in select Query

From: Kimberly Israel <kac15228(at)yahoo(dot)com>
To: Naman <naman(dot)bbps(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Using index name in select Query
Date: 2013-10-19 12:45:13
Message-ID: 1382186713.79837.YahooMailNeo@web161604.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)bbps(at)gmail(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message David Johnston 2013-10-19 13:18:19 Re: Using index name in select Query
Previous Message Naman 2013-10-19 05:32:58 Using index name in select Query