Bonjour,
La requete ci dessous a un problème, elle met beaucoup de temps pour s'exécuter, est ce qu'il y 'aura un moyen d'optimiser la requete, pour réduire le temps d’exécution de la requete ?

Voici le script SQL:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
 
select 	
max(O.ota_date_debut) as "année de dernière observation",
T.tax_nom_vern as "nom vernaculaire",
T.tax_nom_complet as "nom scientifique",
R.tae_url_inpn as "lien vers les textes législatifs",
C.tlo_nom_type_localisation as "précision de la donnée",
W.gta_nom_groupe_taxonomique as "groupe d'espèce",
X.sgt_nom_sous_groupe_taxonomique as "sous groupe d'espèce",
Q.tst_nom_type_statut as "menace",
Q.tst_nom_type_statut as "statut biologique",
A.str_nom_structure as "expert régional à contacter",
M.sta_nom_statut as "protection national ou régional"
 
from   	t_taxref T,
		t_taxref_reglementation R,
		t_observation_taxon O,
		t_taxon_observe P, 
		tv_taxon_protection N,
		t_localisation B,
		tr_type_localisation C,
		tj_taxon_a_statut_new D,
		tr_statut_new S, 
		tr_type_statut_new Q,
		tr_groupe_taxonomique W,
		tr_sous_groupe_taxonomique X,
		t_structure A,
		t_referentiel E,
		tj_taxref_protection L,
		t_lot_donnees K,	
		t_contributeur V,	
		tv_taxon_protection M,
		tv_taxon_observe_commune H
 
where   T.tax_id_taxref = L.tax_id_taxref
and 	L.tae_cd_protection = R.tae_cd_protection
and 	T.ref_id_referentiel = E.ref_id_referentiel
and 	E.ref_id_referentiel = P.ref_id_referentiel
and	O.tao_id_taxon = P.tao_id_taxon
and 	O.ota_id_obs_taxon = B.ota_id_obs_taxon
and 	B.tlo_id_type_localisation = C.tlo_id_type_localisation
and 	P.tao_id_taxon = D.tao_id_taxon
and 	D.sta_id_statut = S.sta_id_statut 
and 	Q.tst_id_type_statut = S.tst_id_type_statut
and	O.ldo_id_lot_donnees = K.ldo_id_lot_donnees
and	K.con_id_contributeur = V.con_id_contributeur
and 	V.str_id_structure = A.str_id_structure
and	P.tao_id_taxon = N.tao_id_taxon 
and	Q.tst_id_type_statut in (33 , 45)
and	M.tao_id_taxon = P.tao_id_taxon
and 	P.tao_id_taxon = H.tao_id_taxon 
and 	H.gez_id_geom_zonage = 217715		 
 
group by "nom vernaculaire",
		"nom scientifique",
		"lien vers les textes législatifs",
		"précision de la donnée",
		"groupe d'espèce",
		"sous groupe d'espèce",
		"menace",
		"statut biologique",
		"expert régional à contacter",
		"protection national ou régional"