Bug 37487 - import_records missing index on upload_timestamp field
Summary: import_records missing index on upload_timestamp field
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-26 02:38 UTC by David Cook
Modified: 2024-07-26 02:38 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2024-07-26 02:38:55 UTC
cleanup_database.pl deletes import_records and import_batches based on import_records.upload_timestamp, but this isn't an indexed field.

That means the database needs to do a row scan through all rows in order to find which rows to delete. This is inefficient, so it's slow when you have a large number of rows.