By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,178 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,178 IT Pros & Developers. It's quick & easy.

Question about indexes

P: n/a
Only a simple question

I have a table with

primarykey(field1,field2,field3)

and I want to execure a query like

select * from my_table where field1 = some_value

if I define an index on field1, I increase the query performace or not?

Thanks
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Mon, 15 Nov 2004 11:38:29 +0100, Stefano Bonnin
<st************@comai.to> wrote:

Only a simple question

I have a table with

primarykey(field1,field2,field3)

and I want to execure a query like

select * from my_table where field1 = some_value

if I define an index on field1, I increase the query performace or not?


You increase it a bit. Anyway its not worth the hassle, as increase is
rather marginal, and having two indexes lessens the chance that
they'll be served from cache.

If you're not sure yet, just make some tests. :)

Regards,
Dawid

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.