Skip to content
Snippets Groups Projects

Speedup proposal for `list_comments`

Merged Dariusz Kędzierski requested to merge dk-list-comments-by-permlink-speedup into develop
All threads resolved!
  • Changed purpose of a hive_posts_api_helper to hold author and permlink data,
  • Refactor of list_comments_by_permlink query
  • Added missing indices
  • Improvement of query time is observed
Edited by Dariusz Kędzierski

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
302 302 sa.Table(
303 303 'hive_posts_api_helper', metadata,
304 304 sa.Column('id', sa.Integer, primary_key=True, autoincrement = False),
305 sa.Column('author', VARCHAR(16, collation='C'), nullable=False),
306 sa.Column('parent_author', VARCHAR(16, collation='C'), nullable=False),
307 sa.Column('parent_permlink_or_category', sa.String(255, collation='C'), nullable=False),
308 sa.Index('hive_posts_api_helper_parent_permlink_or_category', 'parent_author', 'parent_permlink_or_category', 'id')
305 sa.Column('author_permlink', VARCHAR(512, collation='C'), nullable=False),
306 sa.Index('hive_posts_api_helper_author_permlink', 'author_permlink', 'id')
  • Bartek Wrona
    Bartek Wrona @wrona started a thread on commit 7c1cb907
  • 302 302 sa.Table(
    303 303 'hive_posts_api_helper', metadata,
    304 304 sa.Column('id', sa.Integer, primary_key=True, autoincrement = False),
    305 sa.Column('author', VARCHAR(16, collation='C'), nullable=False),
    306 sa.Column('parent_author', VARCHAR(16, collation='C'), nullable=False),
    307 sa.Column('parent_permlink_or_category', sa.String(255, collation='C'), nullable=False),
    308 sa.Index('hive_posts_api_helper_parent_permlink_or_category', 'parent_author', 'parent_permlink_or_category', 'id')
    305 sa.Column('author_permlink', VARCHAR(512, collation='C'), nullable=False),
  • added 1 commit

    • 578598ed - Added permlink to order in inner join

    Compare with previous version

  • Dariusz Kędzierski resolved all threads

    resolved all threads

  • Test Now Was
    Hivemind database_api.list_comments patterns test order "by_permlink" 0.66s 0.76s
    Hivemind database_api.list_comments patterns test order "by_permlink" good params 0.64s 0.79s
    Hivemind database_api.list_comments patterns test order "by_permlink" only author 0.48s 1.10s
    Hivemind database_api.list_comments patterns test order "by_permlink" good permlink 0.13s 1.34s
    Hivemind database_api.list_comments patterns test order "by_permlink" no data 0.09s 1.34s
  • added 1 commit

    • 10613ffe - Added missing cashout_time index

    Compare with previous version

  • added 2 commits

    • fb00babb - Added missing updated_at index
    • 27facad9 - Added missing indices to recreate procedure. Some indent fixes

    Compare with previous version

  • added 1 commit

    • 893f0d99 - Id added to cashout_time index

    Compare with previous version

  • Now Was Test
    0.10s 1.36s Hivemind database_api.list_comments patterns test order "by_permlink" no data
    0.15s 1.33s Hivemind database_api.list_comments patterns test order "by_permlink" good permlink
    0.35s 1.24s Hivemind database_api.list_comments patterns test order "by_permlink" only author
    0.66s 0.81s Hivemind database_api.list_comments patterns test order "by_permlink" good params
    0.34s 0.64s Hivemind database_api.list_comments patterns test order "by_cashout_time" very future date
    0.33s 0.61s Hivemind database_api.list_comments patterns test order "by_cashout_time" all data
    0.69s 0.61s Hivemind database_api.list_comments patterns test order "by_permlink"
    0.35s 0.51s Hivemind database_api.list_comments patterns test order "by_cashout_time" future date
    0.09s 0.49s Hivemind database_api.list_comments patterns test order "by_cashout_time" data exist in database
    0.11s 0.48s Hivemind database_api.list_comments patterns test order "by_cashout_time" data exist in database
    0.19s 0.24s Hivemind database_api.list_comments patterns test order "by_author_last_update" correct author and date
    0.09s 0.10s Hivemind database_api.list_comments patterns test order "by_last_update" future date
    0.09s 0.07s Hivemind database_api.list_comments patterns test order "by_last_update" very future
  • reopened

  • added 11 commits

    Compare with previous version

  • Dariusz Kędzierski changed title from Speedup proposal for list_comments{-_by_permlink-} to Speedup proposal for list_comments

    changed title from Speedup proposal for list_comments{-_by_permlink-} to Speedup proposal for list_comments

  • Dariusz Kędzierski changed the description

    changed the description

  • Bartek Wrona
  • added 1 commit

    • 25217007 - Indices names changed to follow naming convention

    Compare with previous version

  • added 39 commits

    Compare with previous version

  • Dariusz Kędzierski resolved all threads

    resolved all threads

  • added 16 commits

    Compare with previous version

  • merged

  • Bartek Wrona mentioned in commit a8037afa

    mentioned in commit a8037afa

  • Please register or sign in to reply
    Loading