Changes between Version 1 and Version 2 of P9


Ignore:
Timestamp:
05/25/26 21:12:06 (16 hours ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • P9

    v1 v2  
    1111Complex reporting query that aggregates per-story statistics grouped by calendar quarter, then computes engagement rates, quarter-over-quarter growth percentages, and per-quarter rankings using window functions across three CTEs.
    1212
    13 {{{ 
     13{{{
    1414WITH quarterly_story_stats AS (
    1515    SELECT
     
    269269
    270270== Indexes for this queries
    271 
     271{{{
    272272CREATE INDEX idx_story_created_at
    273273    ON story(story_created_at);
     
    294294
    295295CREATE INDEX idx_comment_story_id ON comment(story_id);
    296 
    297 
    298296}}}
    299297
     
    304302ANALYZE likes;
    305303ANALYZE comment;
    306 
     304}}}
    307305|QUERY PLAN                                                                                                                                                                                                                                                             |
    308306|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|