Hello, All I have read the source code /cvsroot/pgsql/src/backend/optimizer/path/costsize.c and there is a function cost_sort(...). I think the code in 464 to 465 lines must be changed to: startup_cost += npageaccesses * (1.0 + cost_nonsequential_access(1)) * 0.5;
The original code is: startup_cost += npageaccesses * (1.0 + cost_nonsequential_access(npages)) * 0.5; Can any one discuss about this issue with me ? Thanks for your response very much! ---------------------- Guo long jiang. 2002-9-6 ______________________________________ =================================================================== 新浪免费电子邮箱 (http://mail.sina.com.cn) 新浪分类信息:二手市场走一走,该出手时就出手! (http://classad.sina.com.cn/2shou/) 数万张手机图片数万首短信铃声任你挑选,每天都有更新 (http://sms.sina.com.cn/cgi-bin/sms/smspic.cgi) ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])