473,503 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about indexes

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
1 1967
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1886
by: Paul | last post by:
I'm confused about something I did this week. I have an 8.1.7.4 database with tables partitioned by dates. I recently dropped my maxvalue tablespace, added a few more partitions for up-coming dates,...
4
2547
by: inline_four | last post by:
If I have a table with multiple foreign keys to various other tables, what's the best way to index them: one index that contains all of those columns, or multiple indexes containing one foreign key...
3
2733
by: Rodney King | last post by:
Hi, I am supporting an application that was converted from ACCESS to SQL Server 2000. My question focuses on two particuliar tables. The parent table has 14000 rows while child table has over...
9
1876
by: pheonix1t | last post by:
hello, I've been assigned to do performance tuning on an SQL2000 database (around 10GB in size, several instances). So far, I see a single RAID5 array, 4CPU (xeon 700MHZ), 4GB RAM. I see the...
5
1523
by: Lada 'Ray' Lostak | last post by:
Dear list, First of all I want to say sory, if my question was answered somewhere. Or if it is my fault. If so, please, give me link/hint. My own search fails :( I have experimence with MySql,...
3
5449
by: datapro01 | last post by:
I have a question concerning reorgs. We have a relatively new DB2 system (8.1) on Aix 5.1 and we are trying to institute regular reorgs via scripts. Does it matter if the index for a table or...
1
1523
by: Matthew Wells | last post by:
I have a one to many relationship between two tables. The "one" table has a 5 field PK (total 7 fields, 1400 records) and the "many" table has a 7 field PK (total 15 fields, 1500 records). I...
2
1924
by: datapro01 | last post by:
Running DB2 8.2 on AIX 5.2 I have a question on reorgs and reorgchk results. My reorg script is using the db2reorgchk (which I understand has certain limitations) to determine if a table or an...
2
4765
by: dunleav1 | last post by:
I have a many row and many column table that is in a 16K page size. I have four indexes on the table. I am running row compression on the table. The table does not have a primary key. The table...
2
1549
by: Vogon Jeltz | last post by:
Under SSMS where can one find the list of indices? I can see Stored procedures under Programmability. Is there any place where I can see the list of indexes. Apologies, if this is a stupid...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.