Merge pull request #3765 from ggq89/master
optimize definition of state_heights
This commit is contained in:
commit
8a21198f56
@ -136,7 +136,8 @@ create unique index if not exists block_cid_uindex
|
|||||||
on blocks (cid,height);
|
on blocks (cid,height);
|
||||||
|
|
||||||
create materialized view if not exists state_heights
|
create materialized view if not exists state_heights
|
||||||
as select distinct height, parentstateroot from blocks;
|
as select min(b.height) height, b.parentstateroot
|
||||||
|
from blocks b group by b.parentstateroot;
|
||||||
|
|
||||||
create index if not exists state_heights_height_index
|
create index if not exists state_heights_height_index
|
||||||
on state_heights (height);
|
on state_heights (height);
|
||||||
|
Loading…
Reference in New Issue
Block a user