mirror of
https://github.com/norohind/jubilant-system.git
synced 2025-04-12 04:40:02 +03:00
optimize squad info request
This commit is contained in:
parent
1302582a80
commit
79dbb49c17
@ -10,10 +10,12 @@ squads_by_tag_extended_raw_keys = """select
|
||||
null_fdev(super_power_name) as super_power_name,
|
||||
null_fdev(faction_name) as faction_name,
|
||||
user_tags,
|
||||
inserted_timestamp,
|
||||
max(inserted_timestamp) as inserted_timestamp,
|
||||
squad_id
|
||||
from squads_view
|
||||
where tag = :tag
|
||||
from squads_states
|
||||
where tag = :tag
|
||||
and squad_id not in (select squad_id from squads_states where tag is null)
|
||||
group by platform
|
||||
order by platform;
|
||||
"""
|
||||
|
||||
|
@ -37,6 +37,8 @@ current_season_aegis_score int,
|
||||
previous_season_aegis_score int,
|
||||
inserted_timestamp datetime default current_timestamp);
|
||||
|
||||
create index if not exists idx_squads_states_1 on squads_states (tag) where tag is null; --for squads_by_tag_extended_raw_keys req
|
||||
|
||||
create view if not exists squads_view
|
||||
as
|
||||
select squad_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user