php - Filter data by multiple fields and random field without full table scan -
i creating filter on table.for efficient filtering using multiple column index approach .
suppose table has following fields.
field_a | field_b | field_c | field_d ------------------------------------------------------ 1 | 346 | 934 | 659 2 | 709 | 497 | 24 3 | 835 | 853 | 73 4 | 325 | 935 | 45 5 | 346 | 287 | 345
query work fine if field_a prefix in filter query. such following order work fine.
1. field_a 2. field_a field_b 3. field_a field_b field_c 4. field_a field_b field_c field_d
but index not work if have combination of fields other that.
- field_b field_d
- field_b field_c
- field_c field_d
- or other random combination
i know working fine according multiple column index definition.
what want know there other approach can use filter fields in random order without going throw full table scan. fields has integer data type
Comments
Post a Comment