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.
精彩评论