Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 55782
Status: resolved
Worked: 30 min
Priority: 0/
Queue: CPANPLUS

People
Owner: BINGOS [...] cpan.org
Requestors: darthludi [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.9003
Fixed in: (no value)



Subject: Speed improvement on look-ups when using SQLite
Look-ups for outdated modules (using 'o' command) is quite slow. The attached patch will create 3 indices on the module table, one each on the module and version column, one combined on both, to improve this. Downside to this: The database will almost double in size, and (re-)creation will take longer since transactions aren't used (yet).
Subject: cpanp-sqlite-ix.patch
--- Internals/Source/SQLite.pm.orig 2010-02-17 10:24:25.000000000 +0100 +++ Internals/Source/SQLite.pm 2010-03-22 13:53:42.000000000 +0100 @@ -320,6 +320,45 @@ return; }; + $dbh->query( qq[ + /* the module index */ + CREATE INDEX IX_module_module ON module ( + module + ); + + \n] + + ) or do { + error( $dbh->error ); + return; + }; + + $dbh->query( qq[ + /* the version index */ + CREATE INDEX IX_module_version ON module ( + version + ); + + \n] + + ) or do { + error( $dbh->error ); + return; + }; + + $dbh->query( qq[ + /* the module-version index */ + CREATE INDEX IX_module_module_version ON module ( + module, version + ); + + \n] + + ) or do { + error( $dbh->error ); + return; + }; + return 1; }
Hi, Thanks for this, I have applied the patch and it will be released to CPAN as 0.9005 laterthis evening. Cheers.