[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] Selection is extremely slow when fields with common n
Re: [bug-recutils] Selection is extremely slow when fields with common name exist
Fri, 16 Aug 2013 20:49:33 +0200
On Fri, Aug 16, 2013 at 08:33:03PM +0200, Jose E. Marchesi wrote:
Well presumably it's slow because it has to do a linear search
the list of field values. So the obvious answer would be that
for each field,
there should be a hash table keyed on the field value. That way,
time would go from O(n) to O(1). But perhaps you had already
Working on it...
I just pushed another optimization. Now the query 'junk = "That"' in
the provided database takes about half a second to execute in my
machine. That is some improvement... :)
It certainly sounds good. How does it do with a query involing a regular
liek 'junk ~ "*ha*"' ? I imagine that is a more difficult case to optimise.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
Description: Digital signature