Merge pull request #30 from cromerc/feature_indices

no message
This commit is contained in:
Chris Cromer 2020-07-26 20:04:06 -04:00 committed by GitHub
commit 5ab719bae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

20
indice/indices.sql Normal file
View File

@ -0,0 +1,20 @@
SELECT P.NOMBRE, M.CANTIDAD_ATLETA
FROM MAX_ATLETA_ATLETISMO_PAIS M
LEFT JOIN PAIS P ON (P.ID_PAIS = M.ID_PAIS)
WHERE (M.CANTIDAD_ATLETA = (SELECT MAX(CANTIDAD_ATLETA) FROM MAX_ATLETA_ATLETISMO_PAIS));
SELECT P.ID_PAIS, P.NOMBRE, COUNT(*) AS CANTIDAD_ATLETA
FROM COMPETENCIA C
LEFT JOIN PARTICIPAR_COMPETENCIA PC ON (C.ID_COMPETENCIA = PC.ID_COMPETENCIA)
LEFT JOIN ATLETA A ON A.ID_ATLETA = PC.ID_ATLETA
INNER JOIN DELEGACION D ON (D.ATLETA = A.ID_ATLETA)
INNER JOIN PAIS P ON (P.ID_PAIS = D.PAIS)
WHERE TIPO = (SELECT TD.ID_TIPO FROM TIPOS_DEPORTES TD WHERE (UPPER(TD.DESCRIPCION) = 'ATLETISMO'))
GROUP BY (P.ID_PAIS, P.NOMBRE);
/*Indices*/
CREATE BITMAP INDEX IX_DES ON TIPOS_DEPORTES(DESCRIPCION);
ALTER INDEX IX_APE MONITORING USAGE;
SELECT * FROM USER_INDEXES WHERE TABLE_NAME = 'TIPOS_DEPORTES';