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

David Nind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
  Text to go in the|                            |This fixes the search for
      release notes|                            |data inconsistencies script
                   |                            |(misc/maintenance/search_fo
                   |                            |r_data_inconsistencies.pl)
                   |                            |so that it now runs
                   |                            |significantly faster - it
                   |                            |replaces OR with IN for
                   |                            |subqueries.
                   |                            |
                   |                            |Technical details:
                   |                            |
                   |                            |1. Queries that use OR
                   |                            |instead of IN are less
                   |                            |efficient and can lead to
                   |                            |situations where the query
                   |                            |takes a very long time to
                   |                            |complete due to row level
                   |                            |scanning. Example: We found
                   |                            |one instance where they
                   |                            |query had been running for
                   |                            |over 10 days!
                   |                            |
                   |                            |2. This fix makes ids()
                   |                            |return a subquery instead
                   |                            |of a list of results, and
                   |                            |switches the callers to
                   |                            |using IN. The database now
                   |                            |resolves the set itself and
                   |                            |the queries stay a constant
                   |                            |size no matter how large
                   |                            |the catalog is. This is
                   |                            |super efficient because the
                   |                            |subquery doesn't even
                   |                            |execute as a separate query
                   |                            |since biblionumber is the
                   |                            |primary key!

--- Comment #5 from David Nind <[email protected]> ---
Testing notes (using KTD):
1. Step 9: DBIC_TRACE=1 perl
misc/maintenance/search_for_data_inconsistencies.pl
2. Script runs significantly faster after the patches (noticeable even on the
small set of sample data in KTD)!

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to