Skip to content

1.0.0 Stable

Latest
Compare
Choose a tag to compare
@brazorf brazorf released this 03 Jan 14:46
· 1 commit to master since this release

This release improves database performances a lot. Due to database tweaks, it contains breaking changes.

Database changes:

  • changed the date column to a proper date type
  • removed the hourly precision on records
  • added proper indexes for both the buffer and the visits tables

I decided to change the existing migration files, instead of adding new progressive migrations, because the process of changing column type and indexes could have lead to data corruption or loss, so if you are upgrading from 0.x branch you need to backup your old data and reinstall the new migrations from scratch.

Data and api layer:

  • default date filters automatically tuned on 'currentYear'
  • optimized queries to match with indexes and prevent full table scan
  • date filters refactor, those are now handled in a separate parser
  • removed the redundant countVisits method
  • added the possibility to filter reports by url
  • added a monthly trend report in addition to the daily trend
  • added a cache level on report queries

Performances have been tested in a ~5 million records database with good results. However, i recommend to partition your database tables if size grows nasty, i.e. 1 milion record per partition. Also, a good practice would be to tune your partition to be consistent with date periods (i.e. full year in single partition, single quarter in single partition, etc.) according to your traffic and report type.