contributte / contributte/datagrid
More efficient date filtering
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 296
- Forks
- 215
- PR merge metrics
- No merged PRs in 30d
Description
Right now, the database data-source implementations use following approach to filter by date:
WHERE DATE(column_name) = '2000-12-30'
This approach (at least for some databases) prevents to use defined table index on the column which can cause major performance issue on big tables. Suggested alternative approach:
WHERE (column_name >= '2000-12-30' AND column_name < '2000-12-31')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the database data-source implementations that apply date filters and compare their generated SQL with the examples in this issue. Update the filtering approach so indexed date columns remain usable, then verify that each affected data source still matches the requested date and run the relevant test suite if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100