Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite: selectall_arrayref speed question

Is there a difference in speed between these two modi?

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

selectall_arrayref( "SELECT a, b FROM $table", { Slice => {} } );
like image 965
sid_com Avatar asked Jun 24 '26 09:06

sid_com


1 Answers

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.

like image 64
bvr Avatar answered Jun 26 '26 09:06

bvr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!