We'd love to be able to render a few graphs to understand forum usage over time (maybe eventually they could live in the Admin dashboard).
This helps understand patterns our team experiences, such as "there appears to be more users reporting XXX".
As a starting point, it'd be great to have some example SQL statements we could run to extract this type of data and visualize it ourselves.
- Number of new posts per day
- Number of new threads (pages) per day
And then get a table with the day and the number aggregated. We could then always feed this to various graphics engines for the visualization.
KajMagnus @KajMagnus2026-02-16 06:22:27.504Z2026-02-16 06:36:24.001ZYes this'd be nice. Here's the new-comments-per-day, and new-pages-per-day:
(Let me know if you want more SQL for sth else. & Sorry for the a bit late reply.)
select date_trunc('day', p.created_at) as date_trunk_day, count(case when p.post_nr > 1 then 1 end) new_comments, count(case when p.post_nr = 1 then 1 end) new_pages, s.id site_id, h.host from posts3 p -- will be renamed to posts_t some day inner join sites3 s on p.site_id = s.id inner join hosts3 h on h.site_id = s.id and h.canonical = 'C' where h.host not like 'test-%' and p.post_nr >= 1 -- ignore title (nr 0) and special posts, e.g. bookmarks (nr < 0) group by date_trunk_day, s.id, h.host order by date_trunk_day desc, s.id limit 365;extract this type of data and visualize it ourselves.
How would you go about doing that? (For example, how do you "create" an API to get the data out of the database?)
I did experiment quickly on localhost some time ago with connecting Metabase (I think it was), https://www.metabase.com, directly to a Talkyard database. Was pretty easy to get it working and showing different graphs. However, in your case you'd need some authentication in front of Metabase.
Edit: There's also Apache Superset, https://superset.apache.org, and Redash, https://redash.io/. (And more ...)
We could then always feed this to various graphics engines
It would be interesting to hear about what tools you're using :- )
- CChristian Scheuer @chrscheuer
Thank you!! Can't wait to try this.
I would probably just use gcloud ssh into the engine and run a script that then returns the data directly out so I just receive the output in my own CLI and can store here instead of juggling setting up something permanent on the server (I prefer to keep it lean Talkyard).
Then probably ask AI to build a python script to visualize it, or something like that. We mostly just want this for internal graphs and evaluation, so no need for a big fancy pipeline.
- CChristian Scheuer @chrscheuer
This works beautifully! Thank you Magnus!
- Progresswith doing this idea

