Optimizing Query

15 pts.
Tags:
Database performance and tuning
Query optimization
SELECT statement
Hi, I am having a table which is having around 170 Columns(Don't blame me but my Developer) and there are only 989 records in the table.I created all sorts of Indexes but still the query (Select * from Table) takes almost 2 mins to display 989 records.I need all the columns to be displayed.Is there any way I can make this query to run faster.Thanks In Advance - Sachin
ASKED: June 11, 2008  11:30 AM
UPDATED: July 4, 2008  9:18 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you are returning all records adding indexes won’t do you any good. A table scan is being done. How much data is in the table? What is the latency between you and the SQL Server?

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Denny Cherry
    Check out my SQL Server blog "SQL Server with Mr Denny" for more SQL Server information.
    65,450 pointsBadges:
    report
  • Sachin VCO
    There is around 1000 records only.and Latency is Pinging [172.30.5.48] with 32 bytes of data: Reply from 172.30.5.48: bytes=32 time=218ms TTL=122 Reply from 172.30.5.48: bytes=32 time=218ms TTL=122 Reply from 172.30.5.48: bytes=32 time=221ms TTL=122 Reply from 172.30.5.48: bytes=32 time=218ms TTL=122
    15 pointsBadges:
    report
  • Ritchie1
    Try Select * from Table with (nolock) - if this runs faster then the issue is not indexes etc but locking. If it is still slow try defragmenting table and its indexes. Also such a large number of columns shows lack of normalisation and are you sure you need: Select * from table without restricting which columns or using a where statement to restrict which rows? I would look at the whole design issue and try to improve table and query structure.
    210 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following