我在 Discourse 的某个地方读到过一篇帖子,但现在已经找不到了。帖子里有人用 SQL 查询编写了有用的指标/统计信息……有好几个,我想用上它们。
你能帮我指一下吗?
此致,
我在 Discourse 的某个地方读到过一篇帖子,但现在已经找不到了。帖子里有人用 SQL 查询编写了有用的指标/统计信息……有好几个,我想用上它们。
你能帮我指一下吗?
此致,
It is possible to enter the ruby console and run ActiveRecord queries, if you feel more comfortable doing that.
But IMHO, the best way is to use the Data Explorer plugin.
Some knowledge of the database architecture is still needed, especially for complex queries. But many (IMHO, most) times it is intuitive. eg.
it is clear that the posts table’s posts.topic_id field references the topics table’s topics.id field.