Skip to content

[1.0.0] Add an NIS schema / fix integer ordering performance.#208

Merged
ChadSikorra merged 2 commits into
FreeDSx:mainfrom
ChadSikorra:upgrade/cast-integer-queries
Jul 11, 2026
Merged

[1.0.0] Add an NIS schema / fix integer ordering performance.#208
ChadSikorra merged 2 commits into
FreeDSx:mainfrom
ChadSikorra:upgrade/cast-integer-queries

Conversation

@ChadSikorra

Copy link
Copy Markdown
Contributor

The current way that integers are compared in PDO happens lexicographically (as the underlying data is stored as strings for attribute => values). When someone uses a GTE / LTE filter, this over-selects, causing us to have to filter the result set via PHP. To fix this we need to determine if the attribute being compared is an integer / numeric. Then PDO can cast the value to an integer and compare it normally. This fixes directory scaling issues with range related filters. I also need a follow up to fix scaling issues with subsearch filters in general so we page through / cap as we go in PDO, since results can be inexact by nature.

…it's compared properly and not lexographically as a string. Not doing this causes a huge performance penalty, as we over-select entries otherwise.
@ChadSikorra ChadSikorra merged commit a8345aa into FreeDSx:main Jul 11, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant