Search results matching tags 'Partitioning' and 'clr'http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&tag=Partitioning,clr&orTags=0Search results matching tags 'Partitioning' and 'clr'en-USCommunityServer 2.1 SP2 (Build: 61129.1)Connect Digest : 2011-09-22http://sqlblog.com/blogs/aaron_bertrand/archive/2011/09/22/connect-digest-2011-08-22.aspxThu, 22 Sep 2011 11:31:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:37568AaronBertrand<p><font size="4">Where is SYSDATE()? </font><br></p><p>I've talked about this one before, but due to a recent conversation about building a datetime value from separate date/time columns or variables, it may be worth bringing up again. When SQL Server 2008 introduced several new date/time types, they also added new built-in functions, like SYSDATETIME() and SYSDATETIMEOFFSET(). But they forgot about the same functions they forgot about back when GETDATE() and GETUTCDATE() were introduced: functions that return only date or only time. So we're still stuck with using implicit conversion to assign CURRENT_TIMESTAMP or SYSDATETIME() to a DATE or TIME variable, only to throw away the irrelevant part.<br></p><p style="margin-left:40px;"><a href="http://connect.microsoft.com/SQLServer/feedback/details/293333" title="http://connect.microsoft.com/SQLServer/feedback/details/293333" target="_blank">Connect #293333 : SQL 2008: Add sysdate()</a> <br></p>
<p><br><font size="4">Where is my built-in sequence?</font></p><p>In Denali we've seen the addition of SEQUENCE, an easy and more efficient way to centralize IDENTITY-like identifier values. But often we want to generate these numbers without incrementing a counter or running a bunch of inserts. To generate numbers on the fly in cases where I haven't been able to create my own numbers table, I often use master..spt_values.number, convoluted CTEs, or ROW_NUMBER() OVER () a cross join against arbitrary system tables. Why can't there be an in-memory table of numbers that we could reference, without all this extra scaffolding?<br></p><p style="margin-left:40px;"><a href="http://connect.microsoft.com/SQLServer/feedback/details/258733/add-a-built-in-table-of-numbers" title="http://connect.microsoft.com/SQLServer/feedback/details/258733/add-a-built-in-table-of-numbers" target="_blank">Connect #258733 : Add a built-in table of numbers</a></p><p><font size="4"><br>Why is CLR still so hard?</font><br></p><p>For ages I've wished it were easier to implement CLR solutions. RegEx is still not in SQL Server, and CLR has proven much more efficient than traditional XML, numbers table and looping methods in dealing with string splitting operations as well. And probably dozens of use cases that I haven't had the necessity to research myself. But it is often hard to help folks implement this on their own, never mind deal with strict DBA/management environments where CLR is still off-limits. Wouldn't it be great if it were far easier to implement C# code directly within a stored procedure or function, without all the overhead of deploying a DLL, creating an assembly, etc.<br></p><p style="margin-left:40px;"><a href="http://connect.microsoft.com/SQLServer/feedback/details/265266/add-server-side-compilation-ability-to-sql-clr" title="http://connect.microsoft.com/SQLServer/feedback/details/265266/add-server-side-compilation-ability-to-sql-clr" target="_blank">Connect #265266 : Add server-side compilation ability to SQL CLR</a> <br></p>
<p><br><font size="4">Will CASE always evaluate in left-to-right order?</font></p><p>The documentation for CASE states that the WHEN expressions are evaluated in textual order. Most people infer from this that any subsequent expression will not be evaluated, but there have been several cases where this has not been true. While I didn't find this particular manifestation of the bug (that was Itzik), and while I do hope they correct this scenario, I'm much more interested in clarity in the documentation so that people know whether or not they can rely on this behavior to <span style="font-weight:bold;font-style:italic;">always</span> be true.</p><p style="margin-left:40px;"><a href="http://connect.microsoft.com/SQLServer/feedback/details/690017/case-coalesce-wont-always-evaluate-in-textual-order" title="http://connect.microsoft.com/SQLServer/feedback/details/690017/case-coalesce-wont-always-evaluate-in-textual-order" target="_blank">Connect #690017 : CASE / COALESCE won't always evaluate in textual order</a></p><p><br><font size="4">Why can't I have partition-level stats?</font></p><p>Partitioning is great, but if you have disproportionate partition sizes, or a lot of partitions, statistics can become a real challenge. Consider a table with 100 million rows, but only 1 million rows in the currently active partition. If you want to update the statistics on the active partition, your probable approach today is to update statistics on the whole table. (The same type of issue exists with filtered indexes - auto statistics updates kicks in based on the row count in the table, not the subset in the index.)</p><div style="margin-left:40px;"><a href="http://connect.microsoft.com/SQLServer/feedback/details/468517/update-statistics-at-the-partition-level" title="http://connect.microsoft.com/SQLServer/feedback/details/468517/update-statistics-at-the-partition-level" target="_blank">Connect #468517 : Update Statistics at the partition level</a><br><br><a href="http://connect.microsoft.com/SQLServer/feedback/details/328093/statistics-are-saved-on-table-level-and-not-on-partition-level" title="http://connect.microsoft.com/SQLServer/feedback/details/328093/statistics-are-saved-on-table-level-and-not-on-partition-level" target="_blank">Connect #328093 : Statistics are saved on table level and not on partition level</a><br><br><a href="http://connect.microsoft.com/SQLServer/feedback/details/457024/update-statistics-top-100-percent-and-sort-warnings" title="http://connect.microsoft.com/SQLServer/feedback/details/457024/update-statistics-top-100-percent-and-sort-warnings" target="_blank">Connect #457024 : Update statistics, top 100 percent and Sort warnings</a><br></div><p>&nbsp;<br></p>