Speedup proposal for `list_comments`
All threads resolved!
All threads resolved!
- Changed purpose of a
hive_posts_api_helper
to holdauthor
andpermlink
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
Activity
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') 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), - Resolved by Dariusz Kędzierski
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 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 added 11 commits
-
893f0d99...a0d8052f - 10 commits from branch
develop
- 930be081 - Rebase to current develop
-
893f0d99...a0d8052f - 10 commits from branch
- Resolved by Dariusz Kędzierski
- Resolved by Dariusz Kędzierski
- Resolved by Dariusz Kędzierski
added 1 commit
- 25217007 - Indices names changed to follow naming convention
added 39 commits
-
25217007...f04afa3c - 38 commits from branch
develop
- 83b49ac8 - Merge branch 'dk-list-comments-by-permlink-speedup' of...
-
25217007...f04afa3c - 38 commits from branch
added 16 commits
-
83b49ac8...437b7aca - 15 commits from branch
develop
- a0409cee - Rebase to current develop
-
83b49ac8...437b7aca - 15 commits from branch
mentioned in commit a8037afa
Please register or sign in to reply