Patch to add index to SMS table

Alexander Nikolaev variomap at gmail.com
Fri Mar 27 17:16:47 UTC 2015


Holger,

> What is the benefit of using ";" to execute both
> statements with a single sqlite3 command in db_prepare?

I don't think there's a big difference, not in case of sqlite anyway,
since its -prepare  and -exec calls support both single statements and
sql statemens list.
If separate SQL statements better match the approved code style, I've
created a patch that uses separate query for index creation --
https://gist.github.com/ati/3089e35080598495ca27

> What we would like to do is to avoid using libdbi.
Do you have in mind some other abstraction layer or think that it is
better to just use native sqlite interface?
It would be great if it is possible to use asynchronous db calls, but
this requires major rewrite of the database interface.


Regards,
Alexander Nikolaev
fairwaves.co

On Thu, Mar 26, 2015 at 12:41 AM, Holger Hans Peter Freyther
<holger at freyther.de> wrote:
> On Wed, Mar 25, 2015 at 02:46:23PM +0300, Alexander Nikolaev wrote:
>> Hi,
>
> Hey,
>
>> Patch: https://gist.github.com/ati/5ef481954f5bd38d00fc
>
> great! What is the benefit of using ";" to execute both
> statements with a single sqlite3 command in db_prepare?
> Any disadvantage to introduce a new key for the index?
>
>
>> SQL queries benchmark script (python):
>> https://gist.github.com/ati/bd03be698a89e24d8a89
>
> What we would like to do is to avoid using libdbi. It has
> known and unfixed memory access issues, for sqlite3 it
> needs to execute pragma statements for each column we
> query. Would you be interested to do more work on the
> database interface?
>
> holger
>



More information about the OpenBSC mailing list