Patch to add index to SMS table

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Alexander Nikolaev variomap at gmail.com
Wed Mar 25 11:46:23 UTC 2015


Hi,

I would like to introduce new index for the SMS table.

I've run benchmarks using test database with about 8500 records in
both SMS and Subscriber tables. Introducing SMS(dest_addr) index
reduces execution time 4 times for this benchmark.

As far as I can see,  db_sms_get_unsent() gets called frequently, so
real-life benefits might also be considerable, especially for the
large datasets.

Patch: https://gist.github.com/ati/5ef481954f5bd38d00fc
SQL queries benchmark script (python):
https://gist.github.com/ati/bd03be698a89e24d8a89


Regards,
Alexander



More information about the OpenBSC mailing list