Unix Technical Forum

Forcing use of a particular index

This is a discussion on Forcing use of a particular index within the Pgsql Performance forums, part of the PostgreSQL category; --> http://www.postgresql.org/docs/8.0/s...s-examine.html Says: "If you do not succeed in adjusting the costs to be more appropriate, then you may have ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:57 AM
Karl O. Pinc
 
Posts: n/a
Default Forcing use of a particular index

http://www.postgresql.org/docs/8.0/s...s-examine.html

Says:

"If you do not succeed in adjusting the costs to be more
appropriate, then you may have to resort to forcing index
usage explicitly."

Is there a way to force a query to use a particular index?
If not, what does this sentence mean?

Thanks.


Karl <kop@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:57 AM
Jacques Caron
 
Posts: n/a
Default Re: Forcing use of a particular index

Hi,

At 01:16 28/06/2005, Karl O. Pinc wrote:
>http://www.postgresql.org/docs/8.0/s...s-examine.html
>
>Says:
>
>"If you do not succeed in adjusting the costs to be more
>appropriate, then you may have to resort to forcing index
>usage explicitly."
>
>Is there a way to force a query to use a particular index?


Not that I know of.

>If not, what does this sentence mean?


That you can force the planner to use an index (any one) over not using an
index (and using seq scans instead) by setting enable_seqscan to off.

Jacques.



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:51 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com