Querying the new sqlite request logs

The documentation on the SQLite request logs says that reporting on aggregated monthly usage is easier.

We have a usage chart that provides a calendar heat map showing our products usage, based on request log records.

If we switch to the SQLite request logs, which I prefer architecturally, can you query the logs as a whole or do we need to manually query each month’s database?

BTW The Logging UI will let you use AutoQueryGrid to query/filter through your current monthly request logs. We’ll update it in the next release to be able to select different months to query and look at doing some aggregation stats for some analysis across all month dbs.

As they’re stored in separate monthly databases, to query them whole you’d need to write a script that combines all of them into a single db.

Should be fairly trivial to do by writing a C# program that goes through all dbs in a directory selects them into RequestLog and inserts them into a combined db. Another great alternative for SQLite scripts is to use bun which has embedded support for SQLite so you can create standalone executable .ts scripts in typescript that use SQLite without needing any npm deps.

Ok thanks for the info.

Given our current setup and use-case, we might be better served partitioning the SQLServer table that currently stores the RequestLogs, to achieve a similar improvement in request log housekeeping.

1 Like