<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx</link><description>There are a number of ways to query for data that is stored in a SQL Database from ASP.NET.&amp;#160; Generally the best way is to use stored procedures.&amp;#160; They can be compiled to be faster, and they are also much safer as they protect you from SQL injection</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8337792</link><pubDate>Wed, 26 Mar 2008 17:11:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8337792</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8338324</link><pubDate>Wed, 26 Mar 2008 22:34:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8338324</guid><dc:creator>Francois Ward</dc:creator><description>&lt;p&gt;I'm not into the whole SP vs dynamic SQL thing, so don't take this as starting a debate :)&lt;/p&gt;
&lt;p&gt;That said... parameterized queries are also immune to SQL injection, and SQL Server also cache their query plans (which is the only &amp;quot;compilation&amp;quot; it does with stored procedures, too). There are finer details, but thats the general idea. Many of the other RDBMS work that way, too.&lt;/p&gt;
&lt;p&gt;So while there's a million (good) reasons to use SPs, these really aren't part of that equation :)&lt;/p&gt;</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8338386</link><pubDate>Wed, 26 Mar 2008 23:50:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8338386</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Those are very good points. &amp;nbsp;I was trying to keep it simple but yes, those are very good things to point out.&lt;/p&gt;
</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8339180</link><pubDate>Thu, 27 Mar 2008 10:42:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339180</guid><dc:creator>Sajid Wahab</dc:creator><description>&lt;p&gt;I have a problem with SQL Server,,,&lt;/p&gt;
&lt;p&gt;there are round about 7 hundred thousand records,, and I use multiple joins in select queries....&lt;/p&gt;
&lt;p&gt;after 3, 4 transactions it prompt me with,,&lt;/p&gt;
&lt;p&gt;Possible ErrorMsg 5242, Level 22, State 1, Line 1&lt;/p&gt;
&lt;p&gt;An inconsistency was detected during an internal operation in database 'tempdb'(ID:2) on page (1:781). Please contact technical support. Reference number 4.&lt;/p&gt;
&lt;p&gt;can any body HELP me,,,.:(&lt;/p&gt;</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8339312</link><pubDate>Thu, 27 Mar 2008 12:25:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339312</guid><dc:creator>Josh Coswell</dc:creator><description>&lt;p&gt;Good insight.&lt;/p&gt;
&lt;p&gt;I will look for some more exmples of this kind in Large Data in SQL&lt;/p&gt;
&lt;p&gt;Is'nt large data from the database query independent of whether we use SP or NOT?&lt;/p&gt;
&lt;p&gt;Josh&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://riverasp.net"&gt;http://riverasp.net&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8339404</link><pubDate>Thu, 27 Mar 2008 13:26:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339404</guid><dc:creator>Suprotim</dc:creator><description>&lt;p&gt;The TOP clause in SQL Server 2005 has been enhanced. You can now specify an expression as the number definition in the TOP clause. This makes your TOP clause dynamic as you can pass the number value in a variable and use that variable in the TOP clause of your T-Sql query or your stored proc&lt;/p&gt;
&lt;p&gt;Sample Usage:&lt;/p&gt;
&lt;p&gt;DECLARE @TopVar AS int&lt;/p&gt;
&lt;p&gt;SET @TopVar = 20&lt;/p&gt;
&lt;p&gt;SELECT TOP(@TopVar)&lt;/p&gt;
&lt;p&gt;CustomerID,CompanyName, ContactName&lt;/p&gt;
&lt;p&gt;FROM Northwind.dbo.Customers&lt;/p&gt;</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8339901</link><pubDate>Thu, 27 Mar 2008 18:58:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339901</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Josh, you are right, and the link I give has T-SQL and Stored procedures limiting the amount of data returned.&lt;/p&gt;
</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8339902</link><pubDate>Thu, 27 Mar 2008 18:59:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339902</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Great info Suprotim, this is exactly the kind of thing that will help in this situation&lt;/p&gt;
</description></item><item><title>re: ASP.NET Tips: Working with large SQL tables</title><link>http://blogs.msdn.com/tom/archive/2008/03/26/asp-net-tips-working-with-large-sql-tables.aspx#8339922</link><pubDate>Thu, 27 Mar 2008 19:06:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339922</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Sajid, a quick search pointed me to:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/bb326394.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb326394.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And some useful info on:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/03/10/how-to-create-a-corrupt-database-using-bulk-insert-update-and-bcp-sql-server-as-a-hex-editor.aspx"&gt;http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/03/10/how-to-create-a-corrupt-database-using-bulk-insert-update-and-bcp-sql-server-as-a-hex-editor.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also may want to follow-up on this forum:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=96651"&gt;http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=96651&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>