<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>蝈蝈俊.net - 数据库相关</title><link>http://blog.csdn.net/ghj1976/category/308179.aspx</link><description>数据库相关</description><dc:language>zh-CN</dc:language><lastUpdateTime>Fri, 18 Apr 2008 15:53:44 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>ghj1976</dc:creator><title>SQL Server 索引基础知识(9)----Indexing for OR</title><link>http://blog.csdn.net/ghj1976/archive/2008/01/18/2051372.aspx</link><pubDate>Fri, 18 Jan 2008 14:33:00 GMT</pubDate><guid>http://blog.csdn.net/ghj1976/archive/2008/01/18/2051372.aspx</guid><wfw:comment>http://blog.csdn.net/ghj1976/comments/2051372.aspx</wfw:comment><comments>http://blog.csdn.net/ghj1976/archive/2008/01/18/2051372.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/ghj1976/comments/commentRss/2051372.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2051372</trackback:ping><description>我们仍然是通过例子来理解OR运算符的特征 我们仍然使用 http://blog.joycode.com/ghj/archive/2008/01/18/113870.aspx 中的 member 表,这时候,这个表的索引如下:    名字 描述 列  member_corporation_link nonclustered located on PRIMARY corp_no  member_ident clustered, unique, primary key located on PRIMARY member_no  member_region_link nonclustered located on PRIMARY region_no  MemberFirstName nonclustered located on PRIMARY firstname  MemberLastName nonclustered located on PRIMARY lastname 我们执行下面的查询SELECT m.LastName, m.FirstName, m.Region_NoFROM db&lt;img src ="http://blog.csdn.net/ghj1976/aggbug/2051372.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>ghj1976</dc:creator><title>SQL Server 索引基础知识(6)----索引的代价，使用场景</title><link>http://blog.csdn.net/ghj1976/archive/2008/01/16/2046887.aspx</link><pubDate>Wed, 16 Jan 2008 14:34:00 GMT</pubDate><guid>http://blog.csdn.net/ghj1976/archive/2008/01/16/2046887.aspx</guid><wfw:comment>http://blog.csdn.net/ghj1976/comments/2046887.aspx</wfw:comment><comments>http://blog.csdn.net/ghj1976/archive/2008/01/16/2046887.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/ghj1976/comments/commentRss/2046887.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2046887</trackback:ping><description>&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; 前几天给同事培训了聚集索引，非聚集索引的知识后，在一个同事新作的项目中，竟然出现了滥用聚集索引的问题。看来没有培训最最基础的索引的意义，代价，使用场景，是一个非常大的失误。这篇博客就是从这个角度来罗列索引的基础知识。 &amp;amp;nbsp; 使用索引的意义  索引在数据库中的作用类似于目录在书籍中的作用，用来提高查找信息的速度。  使用索引查找数据，无需对整表进行扫描，可以快速找到所需数据。 使用索引的代价  索引需要占用数据表以外的物理存储空间。  创建索引和维护索引要花费一定的时间。  当对表进行更新操作时，索引需要被重建，这样降低了数据的维护速度。 创建索引的列  主键  外键或在表联接操作中经常用到的列  在经常查询的字段上最好建立索引 不创建索引的列  很少在查询中被引用  包含较少的惟一值  定义为 text、ntext 或者 image 数据类型的列 &amp;amp;nbsp; Heaps是staging data的很好选择，当它没有任何Index时  Exc&lt;img src ="http://blog.csdn.net/ghj1976/aggbug/2046887.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>ghj1976</dc:creator><title>SQL Server 索引基础知识(5)----理解newid()和newsequentialid()</title><link>http://blog.csdn.net/ghj1976/archive/2008/01/08/2030402.aspx</link><pubDate>Tue, 08 Jan 2008 15:06:00 GMT</pubDate><guid>http://blog.csdn.net/ghj1976/archive/2008/01/08/2030402.aspx</guid><wfw:comment>http://blog.csdn.net/ghj1976/comments/2030402.aspx</wfw:comment><comments>http://blog.csdn.net/ghj1976/archive/2008/01/08/2030402.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/ghj1976/comments/commentRss/2030402.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2030402</trackback:ping><description>在SQL Server 2005 中新增了一个函数:newsequentialid()，MSDN 中对这个函数的描述如下： 在指定计算机上创建大于先前通过该函数生成的任何 GUID 的 GUID。NEWSEQUENTIALID() 不能在查询中引用。NEWSEQUENTIALID() 只能与 uniqueidentifier 类型表列上的 DEFAULT 约束一起使用。 这个函数的具体用法在下面这篇博客中已经有详细的描述了。 使用NEWSEQUENTIALID解决GUID聚集索引问题http://www.cnblogs.com/Mirricle/archive/2007/08/15/856726.html 简单来说，newsequentialid 函数比起 newid 函数最大的好处是：  如果你在一个 UNIQUEIDENTIFIER 字段上建立索引，使用 newid 产生的新的值是不固定的，所以新的值导致索引B+树的变化是随机的。 而 newsequentialid 产生的新的值是有规律的，则索引B+树的变化是有规律的。有规律和无规律就会带来性能的改进。 &amp;amp;nbsp; 上面&lt;img src ="http://blog.csdn.net/ghj1976/aggbug/2030402.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>ghj1976</dc:creator><title>SQL2005的SQL Server Management Studio对大数据库操作超时解决方法</title><link>http://blog.csdn.net/ghj1976/archive/2007/09/28/1805594.aspx</link><pubDate>Fri, 28 Sep 2007 22:13:00 GMT</pubDate><guid>http://blog.csdn.net/ghj1976/archive/2007/09/28/1805594.aspx</guid><wfw:comment>http://blog.csdn.net/ghj1976/comments/1805594.aspx</wfw:comment><comments>http://blog.csdn.net/ghj1976/archive/2007/09/28/1805594.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blog.csdn.net/ghj1976/comments/commentRss/1805594.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1805594</trackback:ping><description>SQL2005 中，我们使用 SQL Server Management Studio对大数据库操作，不象 SQL2000 的企业管理器那样，作一些大数据库的修改操作时候，不会超时。

&lt;img src ="http://blog.csdn.net/ghj1976/aggbug/1805594.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>