Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server query Performance
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00870369
Message ID:
00870445
Views:
15
The table has 10 million rows. The query is
select top 1000 * from sales where date > '1/27/2003' and week_calculated = 0

date is a datetime field
week_cauculated is a tinyint that store 0 or 1

I first used week_caucluated as bit but I could not create an Index

TIA


>I believe that when you return rows through EM, it begins return rows immediately, fetching more rows in the background.
>
>Starting with the basics, can you issue a query in QA that returns just one or a few rows? How big is your table. In a C/S environment, you would rarely return all rows form a tx table.
>
>Understand that when you return all rows, it is going to be a full table-scan. i.e., no optimization and no indexs (unless I suppose the fields you are returning are all found in an index).
>
>FWIW, based on your facts, while there is likely a "problem", it does not rest with SQL Server.
>
>
>>Hi Guys,
>>
>>I am having a very strange problem. When I run a query in enterprise manager(server machine,open table, return all rows, click on sql button and type the query there) it runs super fast. When i run the same query in the query analyzer on the server machine it hangs. This also happens If i run this query from a VFp Client or .net. it just hangs. can someone help me.
>>
>>The Sql server is running on Windows 2003, 1 gb mem, 300 gb hdd.
>>The LDF file is 110 GB
>>the MDF File is 17 GB. No backup of the transaction log has ever been run. The IT Manager only let me know this 1 day ago.
>>
>>TIA.
Fred Besterwitch, MCP

The harder you work. The luckier you get.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform