开发者

SQLite: selectall_arrayref speed question

开发者 https://www.devze.com 2023-04-03 21:36 出处:网络
Is there a difference in speed between these two modi? selectall_arrayref( \"SELECT * FROM $table\", { Slice => {开发者_JAVA技巧 a => 1, b => 1 } } );

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

精彩评论

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