遗忘海岸

江湖程序员 -Feiph(LM战士)

导航

2012年4月26日 #

一个游标的性能问题

摘要: 一个表大概有20来万记录使用一个游标,当查询语句中用order by id时速度齐慢,计划发现会做多个全表扫描,后来采用 先添加到临时表,再做处理解决------------------------速度很慢的sql----------------- Declare @DieA char(20)Declare @DieB char(20)Declare My_Cursor cursor For select isnull(ModuleID1,''),isnull(moduleId2,'') from product_auto_compjowhere batno=& 阅读全文

posted @ 2012-04-26 20:52 遗忘海岸 阅读(264) 评论(0) 推荐(0) 编辑