faking an index for present queries actually made things slower

fail parsing for decoding errors
This commit is contained in:
leitner
2017-03-29 12:52:24 +00:00
parent 0570db01d5
commit 7a2ea8bd51
2 changed files with 31 additions and 3 deletions

View File

@@ -463,7 +463,7 @@ static int indexable(struct Filter* f) {
}
/* fall through */
case PRESENT:
return 1;
return 0;
#if 0
/* doesn't make much sense to try to speed up negated queries */
case NOT:
@@ -859,6 +859,8 @@ static int useindex(struct Filter* f,struct bitfield* b) {
}
return 0;
case PRESENT:
return 0;
#if 0
{
/* now this is not exactly using an index, but a linear search
* through the record table, but since each check is very cheap,
@@ -873,6 +875,7 @@ static int useindex(struct Filter* f,struct bitfield* b) {
}
return 1;
}
#endif
case LESSEQUAL:
case GREATEQUAL:
case EQUAL: