[Koha-bugs] [Bug 16076] New: DBIx searches - performance issues

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 15 14:20:42 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16076

            Bug ID: 16076
           Summary: DBIx searches - performance issues
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: gmcharlt at gmail.com
          Reporter: abl at biblos.pk.edu.pl
        QA Contact: testopia at bugs.koha-community.org

While testing Bug 11998 and Bug 15341, I did some quick & dirty comparisons on
DBI vs DBIx search performace - how long does it take to fetch from the
database: one small system preference (marcflavour) and all system preferences
(545 rows). Results:

1) one syspref, DBI: 130 microseconds
   ( using 'SELECT value FROM systempreferences WHERE variable = ? LIMIT 1')
2) one syspref, DBIx: 1.25 miliseconds
   ( Koha::Config::SysPrefs->find($var)->value() )
3) all preferences, DBI: 1.8 miliseconds
   ( 'SELECT variable, value FROM systempreferences' )
4) all preferences, DBIx: 21 miliseconds
   ( Koha::Config::SysPrefs->search()->unblessed(), like in Bug 15341)

If I use

    my $all_prefs_rs = Koha::Config::SysPrefs->search(
        undef,
        { columns => [qw/value variable/] }
    )->unblessed();

in 4), search is a bit quicker (17.1 ms). Maybe it can be improved somehow
further, but I don't know how - any ideas?

Those numbers may look not very significant at the first glanace, but remember
that it's not uncommon for the Koha script to make 2000+ DBI calls (in such
cases, they are usually very repetitive - small stuff fetched from
uncomplicated tables, over and over again).

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list