Performance fix for counting all blocks - Closes #342 #461

Merged
merged 1 commit into from Mar 7, 2017

Conversation

Projects
2 participants
@4miners
Member

4miners commented Mar 7, 2017

COUNT on blocks table uses seq scan and takes 500ms-1sec, we can use height of last block as a count for counting all blocks (when no where is supplied, so most of the time). Such query takes less than 1ms to exec.

Closes #342

@karmacoma karmacoma changed the title from 342 - Performance fix for counting all blocks to Performance fix for counting all blocks - Closes #342 Mar 7, 2017

@karmacoma karmacoma added the bug label Mar 7, 2017

@karmacoma karmacoma self-assigned this Mar 7, 2017

@karmacoma karmacoma added this to Pending Review in Version 0.7.0 Mar 7, 2017

@karmacoma

Nice work 👍

@karmacoma karmacoma merged commit 5ab70ef into LiskHQ:development Mar 7, 2017

1 of 2 checks passed

coverage/coveralls Coverage decreased (-0.03%) to 69.355%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@karmacoma karmacoma moved this from Pending Review to Done in Version 0.7.0 Mar 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment