开发者

SQLite: selectall_arrayref speed question

Is there a difference in speed between these two modi?

selectall_arrayref( "SELECT * FROM $table", { Slice => {开发者_JAVA技巧 a => 1, b => 1 } } );

selectall_arrayref( "SELECT a, b FROM $table", { Slice => {} } );


Yes, because the Slice is doing post-processing on client side. So latter example will send only columns a and b in record-set. If there is more columns in the $table, latter call would be less expensive and faster.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜