[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Appropriate index for <= >= filter on generalizedTime (Re: reqStart<= slow)

Roman Rybalko wrote:

I'm trying to use >= <= filter on eq-indexed generalizedTime attribute. Seems
eq-index does not work for <= filter.

Actually the eq index works fine.

olcAttributeTypes: ( 2.999.777. NAME 'logTime' DESC 'Time' EQUALITY
generalizedTimeMatch ORDERING generalizedTimeOrderingMatch SYNTAX )
olcDbIndex: logTime eq
(&(logTime>=201209201440+0400)(logTime<=201209201450+0400)) - 57sec
(|(logTime=20120920144001+0400)(logTime=20120920144008+0400)) - 0.03sec
~ 1000000 records in db, target = 100000000 records
What should I do to make >= filters work efficiently?

Use a correct filter. Your clauses above use invalid syntax.

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/