Query Performance

I have a database tables which contains two tables with records > 30000.

I wrote a database query
"SELECT rank, b.isbn, book_name, volume_no, author, publisher, price, quantity FROM tbl_rank_books b LEFT OUTER JOIN (SELECT * FROM tbl_rank_stock WHERE customer = " + ddlCustomer.SelectedValue + ") s ON b.isbn = s.isbn AND b.category_id = s.category_id WHERE b.category_id = '" + ddlCategory.SelectedValue + "' ORDER BY rank;"

It took me about 1 minute per time in my developer machine while it has timeout error in the server.

I would like to know if there is any room to optimize the query performance. I have already used indexing to do this. If there are no problems, how can i eradicate the timeout problem?

Thank you
[774 byte] By [dummyagain] at [2007-11-20 5:16:07]
# 1 Re: Query Performance
I would like to know if there is any room to optimize the query performance Yes - use stored procedures.
And Yes- rewrite a query (maybe subquery is not good here - use /for example/ table directly)
I have already used indexing to do this.
But ... is it done well?
:D
how can i eradicate the timeout problem
Depending on your development language U can (one ore another way) alter timeout time.;)

Best regards,
Krzemo.
Krzemo at 2007-11-9 13:44:50 >