2013年4月2日
摘要: While join() exclusively deals with the “right” side of the JOIN, we can also control the “left” side, in those cases where it’s needed, using select_from(). Below we construct a query against Address but can still make usage of User.addresses as our ON clause by instructing the Query to select firs 阅读全文
posted @ 2013-04-02 18:04 andy071001 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/pang040328/article/details/4164874为什么要创建索引呢?这是因为,创建索引可以大大提高系统的性能。 第一,通过创建唯一性索引,可以保证数据库表中每一行数据的唯一性。 第二,可以大大加快 数据的检索速度,这也是创建索引的最主要的原因。 第三,可以加速表和表之间的连接,特别是在实现数据的参考完整性方面特别有意义。 第四,在使用分组和排序 子句进行数据检索时,同样可以显著减少查询中分组和排序的时间。 第五,通过使用索引,可以在查询的过程中,使用优化隐藏器,提高系统的性能。也许会有人要问:增加索引有如此多的优点,为什么不对表中的 阅读全文
posted @ 2013-04-02 15:02 andy071001 阅读(151) 评论(0) 推荐(0) 编辑