Thanks<br />Rajesh
[OCP 21 Professional Study Guide] [OCP 17 Complete Study Guide] [OCP 17 Practice Tests] [OCP 11 Complete Study Guide] [OCP 11 Programmer I] [OCP 11 Programmer II] [OCP 11 Practice Tests] [OCA 8] [OCP 8] [OCP 8 Practice Tests Book] [Blog]
Thanks<br />Rajesh
Rajesh MadhanGopal wrote:I always thought that indexing would help in select queries and in complex joins and did not think that indexing would be needed for such a simple query. There is no question of too much load as there are less than 100 rows in the table and the update query will never update more than 1 row at a time.
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Rajesh MadhanGopal wrote:Thanks for the replies..
@Scott: I tried both the above mentioned steps before posting the question here and they were not of much help. I finally resolved the issue by indexing the 2 columns in my Where clause and now the update works like a charm.
I always thought that indexing would help in select queries and in complex joins and did not think that indexing would be needed for such a simple query. There is no question of too much load as there are less than 100 rows in the table and the update query will never update more than 1 row at a time.
Any thoughts are welcome !!
Rajesh MadhanGopal wrote:
I always thought that indexing would help in select queries and in complex joins and did not think that indexing would be needed for such a simple query. There is no question of too much load as there are less than 100 rows in the table and the update query will never update more than 1 row at a time.
Any thoughts are welcome !!
Paul Sturrock wrote:Indices will potentially slow down updates, not speed them up.
Paul Sturrock wrote: Are you sure this change was not just coincidental?
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Thanks<br />Rajesh
[OCP 21 Professional Study Guide] [OCP 17 Complete Study Guide] [OCP 17 Practice Tests] [OCP 11 Complete Study Guide] [OCP 11 Programmer I] [OCP 11 Programmer II] [OCP 11 Practice Tests] [OCA 8] [OCP 8] [OCP 8 Practice Tests Book] [Blog]
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |