[Bug 16076] New: DBIx searches - performance issues
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@gmail.com Reporter: abl@biblos.pk.edu.pl QA Contact: testopia@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16076 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15342 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15342 [Bug 15342] Performance 3.22 - Omnibus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16076 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16079 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16076 --- Comment #1 from Jacek Ablewicz <ablewicz@gmail.com> --- Created attachment 53214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53214&action=edit Bug 16076 - DBIx searches - performance issues Experimental method Koha::Objects->search_all_unblessed() added for testing an impact of DBIx::Class::ResultClass::HashRefInflator on search performance. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16076 --- Comment #2 from Jacek Ablewicz <ablewicz@gmail.com> --- Created attachment 53215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53215&action=edit Bug 16076 - DBIx searches - performance issues Quick & dirty test script for benchmarking database search performance using various DBI and DBIx approaches. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16076 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15341 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16076 --- Comment #3 from Jacek Ablewicz <abl@biblos.pk.edu.pl> --- Benchmark results are in Bug 16079 comment #15 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org