[Yum-devel] Sqlite performance
Florian Festi
ffesti at redhat.com
Fri Mar 23 14:51:41 UTC 2007
seth vidal wrote:
> On Thu, 2007-03-22 at 16:08 +0100, Florian Festi wrote:
>> Easiest solution would be to return a list of (pkg, name, flag, (e,v,r))
>> tuples or a dict {pkg -> list of (n, f, (e,v,r))} (or use new Requires and
>> Conflicts objects). Even better would be to also pass flag and (e,v,r) to
>> the search methods. That way the sqlitesack could put as much intelligence
>> into the SQL queries as it wants to further reduce the amount of data being
>> processed.
>
> the flags and evr for comparisons in SQL aren't the same as in rpm. So
> passing them in won't help you.
>
> ie: if I want foo > 1.1
>
> It can't just look at the version field in the provides of the packages
> db.
>
> so we search names to get as close as we can and then do the search
> using checkPrco.
I see absolutely no reason why this shouldn't be possible in the search
methods. Of course you would have to move the .inPrcoRange() code into the
package sack. In fact the rpmsack supports just that (whatProvides(),
whatRequires()).
If the sqlitesack and the transaction (as virtual sack representing the
future rpmdb) provide this interface, too, the resolver will look much
cleaner and changes on 'who searches where' will be much easier.
Florian
More information about the Yum-devel
mailing list