-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
A l'initialisation des pages sont exécutées un bon nombre de requêtes du type :
SELECT ... FROM ...
WHERE obs.cd_ref in (
select * from atlas.find_all_taxons_childs(:thiscdref)
)
OR obs.cd_ref = :thiscdref
order by ...
Lorsqu'il y a un grand nombre d'observations certaines de ces requêtes peuvent être couteuses en temps d'exécution. Ce temps peut être divisé par presque 4 en réécrivant ces requêtes de la manière suivante :
SELECT ... FROM ...
JOIN (select * from atlas.find_all_taxons_childs(:thiscdref)) as fatc on cd_ref = find_all_taxons_childs
UNION
SELECT ... FROM ...
WHERE cd_ref = :thiscdref
order by ...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog