﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / SQL 2005 - SELECT query takes long time to retrieve / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 13:00:05 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>Thanks Roopesh,As Gail said, been long time since i posted the issue. I resolved it, but dont rememeber how i did it then. In any case, will remember all the options posted in this thread for future.IMHO, i think such replies to older posts, would be helpful to some other lost souls (even if the original person who posted stopped following the thread).</description><pubDate>Thu, 10 Jan 2013 13:00:58 GMT</pubDate><dc:creator>balasach82</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>Please note: 2 year old thread.</description><pubDate>Thu, 10 Jan 2013 00:03:05 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>Create a non clustered index on the field [Time] and then execute the query again.You should have a clustered index on the table also.</description><pubDate>Wed, 09 Jan 2013 23:29:37 GMT</pubDate><dc:creator>Roopesh Kumar</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>Learn something new every day....and man there is a lot to learn.the limit on include columns is 1023.[url]http://msdn.microsoft.com/en-us/library/ms190806.aspx[/url]I stand corrected, when you remake the non clustered index I would make it a covering index over the select statement.But 1st I'd do what Gail had suggested.</description><pubDate>Tue, 20 Jul 2010 08:59:12 GMT</pubDate><dc:creator>SQLBalls</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>[quote][b]Bradley B (7/20/2010)[/b][hr]you cannot do a covering index as the limit is 16 columns, [/quote]The 16 column limit is only on key columns, not on include columns. balasach, please post table definitions, index definitions and execution plan, as per [url]http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]</description><pubDate>Tue, 20 Jul 2010 08:05:29 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>does the table have a clustered index?you cannot do a covering index as the limit is 16 columns, I would deffinitally add a clustered and re-create a non clustered on time.</description><pubDate>Tue, 20 Jul 2010 08:01:32 GMT</pubDate><dc:creator>SQLBalls</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>I had created an index the time column.. but since the query took long time to complete, i dropped that index...As mentioned the Exec plan shows 100% table scan</description><pubDate>Tue, 20 Jul 2010 07:55:09 GMT</pubDate><dc:creator>balasach82</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>Right click in your query &amp;#119;indow.click Incl[u]u[/u]de Actual Execution Planwhen you execute the query next there will be an addition info that shows the Graphical query execution plan.you probably could benefit from a non-clustered index on your date field, or a covering index if the data types are not to large.here is a good tutorial on query optimization.[url]http://www.simple-talk.com/sql/performance/execution-plan-basics/[/url]</description><pubDate>Tue, 20 Jul 2010 07:49:17 GMT</pubDate><dc:creator>SQLBalls</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>33 columns and aboutn 250,000 rows.Execution plan shows Table Scan as 100%. Let me know if any more info is needed</description><pubDate>Tue, 20 Jul 2010 07:45:59 GMT</pubDate><dc:creator>balasach82</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>how many columns and rows is there in this table?if it's a small table it should not take long to display the table at all without indexes on it ...</description><pubDate>Tue, 20 Jul 2010 07:41:39 GMT</pubDate><dc:creator>Feeg</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>select * from table_name where [time] between'2009/6/1 6:00am' and '2009/6/30'no indexes,triggers etc. Field [time] has datatype datetime.</description><pubDate>Tue, 20 Jul 2010 07:38:18 GMT</pubDate><dc:creator>balasach82</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>[quote][b]balasach82 (7/20/2010)[/b][hr]SQL 2005 - SELECT query takes long time to retrieve records from a table which has about 250000 records. Even a top 10 takes 4 to 5 mins. Any remedial measures?[/quote]Not without seeing the query, no. You will get some help if you post the query.You will get better help if you post the execution plans as already suggested.For the best help, post the table definition as well, including any indexes, triggers etc along with some sample data.</description><pubDate>Tue, 20 Jul 2010 07:19:03 GMT</pubDate><dc:creator>ChrisM@Work</dc:creator></item><item><title>RE: SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>When you take a look at the execution plan what do you see?</description><pubDate>Tue, 20 Jul 2010 07:07:18 GMT</pubDate><dc:creator>SQLBalls</dc:creator></item><item><title>SQL 2005 - SELECT query takes long time to retrieve</title><link>http://www.sqlservercentral.com/Forums/Topic955516-146-1.aspx</link><description>SQL 2005 - SELECT query takes long time to retrieve records from a table which has about 250000 records. Even a top 10 takes 4 to 5 mins. Any remedial measures?</description><pubDate>Tue, 20 Jul 2010 06:58:27 GMT</pubDate><dc:creator>balasach82</dc:creator></item></channel></rss>