semillero-INVIMA/benchmarks/results/explain_before/query_05.json

344 lines
12 KiB
JSON

{
"phase": "before",
"generatedAt": "2026-07-12T23:07:27.479Z",
"queryId": "query_05",
"queryName": "Filtro dispositivos vigentes LIMIT 25",
"sqlFile": "queries/query_05.sql",
"explain": {
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 130152.57,
"Total Cost": 130155.48,
"Plan Rows": 25,
"Plan Width": 555,
"Actual Startup Time": 252.701,
"Actual Total Time": 259.039,
"Actual Rows": 25,
"Actual Loops": 1,
"Disabled": false,
"Output": [
"source_dataset_key",
"source_dataset_id",
"source_dataset_name",
"categoria_linea",
"categoria_canonica",
"categoria_slug",
"expediente",
"registro_sanitario",
"producto",
"titular",
"estado_registro",
"fecha_expedicion",
"fecha_vencimiento",
"modalidad",
"grupo",
"marca",
"principio_activo",
"forma_farmaceutica",
"presentacion_comercial",
"atc",
"rol_nombre",
"rol_tipo",
"ciudad_titular",
"pais_titular",
"fabricante",
"importador",
"vigencia"
],
"Shared Hit Blocks": 174,
"Shared Read Blocks": 50173,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Gather Merge",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 130152.57,
"Total Cost": 130157.23,
"Plan Rows": 40,
"Plan Width": 555,
"Actual Startup Time": 252.7,
"Actual Total Time": 259.037,
"Actual Rows": 25,
"Actual Loops": 1,
"Disabled": false,
"Output": [
"source_dataset_key",
"source_dataset_id",
"source_dataset_name",
"categoria_linea",
"categoria_canonica",
"categoria_slug",
"expediente",
"registro_sanitario",
"producto",
"titular",
"estado_registro",
"fecha_expedicion",
"fecha_vencimiento",
"modalidad",
"grupo",
"marca",
"principio_activo",
"forma_farmaceutica",
"presentacion_comercial",
"atc",
"rol_nombre",
"rol_tipo",
"ciudad_titular",
"pais_titular",
"fabricante",
"importador",
"vigencia"
],
"Workers Planned": 2,
"Workers Launched": 2,
"Shared Hit Blocks": 174,
"Shared Read Blocks": 50173,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 129152.55,
"Total Cost": 129152.59,
"Plan Rows": 17,
"Plan Width": 555,
"Actual Startup Time": 226.117,
"Actual Total Time": 226.118,
"Actual Rows": 18.67,
"Actual Loops": 3,
"Disabled": false,
"Output": [
"source_dataset_key",
"source_dataset_id",
"source_dataset_name",
"categoria_linea",
"categoria_canonica",
"categoria_slug",
"expediente",
"registro_sanitario",
"producto",
"titular",
"estado_registro",
"fecha_expedicion",
"fecha_vencimiento",
"modalidad",
"grupo",
"marca",
"principio_activo",
"forma_farmaceutica",
"presentacion_comercial",
"atc",
"rol_nombre",
"rol_tipo",
"ciudad_titular",
"pais_titular",
"fabricante",
"importador",
"vigencia"
],
"Sort Key": [
"invima_api_catalog.fecha_vencimiento DESC NULLS LAST",
"invima_api_catalog.producto"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 50,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 174,
"Shared Read Blocks": 50173,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Workers": [
{
"Worker Number": 0,
"Actual Startup Time": 214.672,
"Actual Total Time": 214.673,
"Actual Rows": 25,
"Actual Loops": 1,
"Sort Method": "top-N heapsort",
"Sort Space Used": 54,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 53,
"Shared Read Blocks": 15127,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
{
"Worker Number": 1,
"Actual Startup Time": 213.139,
"Actual Total Time": 213.14,
"Actual Rows": 25,
"Actual Loops": 1,
"Sort Method": "top-N heapsort",
"Sort Space Used": 40,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 69,
"Shared Read Blocks": 15023,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
],
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": true,
"Async Capable": false,
"Scan Direction": "Forward",
"Index Name": "idx_invima_api_catalog_dataset",
"Relation Name": "invima_api_catalog",
"Schema": "public",
"Alias": "invima_api_catalog",
"Startup Cost": 0.43,
"Total Cost": 129152.2,
"Plan Rows": 17,
"Plan Width": 555,
"Actual Startup Time": 0.463,
"Actual Total Time": 210.292,
"Actual Rows": 41705.67,
"Actual Loops": 3,
"Disabled": false,
"Output": [
"source_dataset_key",
"source_dataset_id",
"source_dataset_name",
"categoria_linea",
"categoria_canonica",
"categoria_slug",
"expediente",
"registro_sanitario",
"producto",
"titular",
"estado_registro",
"fecha_expedicion",
"fecha_vencimiento",
"modalidad",
"grupo",
"marca",
"principio_activo",
"forma_farmaceutica",
"presentacion_comercial",
"atc",
"rol_nombre",
"rol_tipo",
"ciudad_titular",
"pais_titular",
"fabricante",
"importador",
"vigencia"
],
"Index Cond": "(invima_api_catalog.source_dataset_key = 'dispositivos'::text)",
"Rows Removed by Index Recheck": 0,
"Filter": "((COALESCE(invima_api_catalog.estado_registro, ''::text) !~~* '%no vigente%'::text) AND (COALESCE(invima_api_catalog.vigencia, ''::text) !~~* '%no vigente%'::text) AND ((COALESCE(invima_api_catalog.estado_registro, ''::text) ~~* '%vigente%'::text) OR (COALESCE(invima_api_catalog.vigencia, ''::text) ~~* '%vigente%'::text)))",
"Rows Removed by Filter": 21496,
"Index Searches": 1,
"Shared Hit Blocks": 147,
"Shared Read Blocks": 50168,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Workers": [
{
"Worker Number": 0,
"Actual Startup Time": 0.495,
"Actual Total Time": 200.864,
"Actual Rows": 36692,
"Actual Loops": 1,
"Shared Hit Blocks": 42,
"Shared Read Blocks": 15122,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
{
"Worker Number": 1,
"Actual Startup Time": 0.777,
"Actual Total Time": 199.762,
"Actual Rows": 36588,
"Actual Loops": 1,
"Shared Hit Blocks": 53,
"Shared Read Blocks": 15023,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
}
]
}
]
}
]
},
"Settings": {},
"Planning": {
"Shared Hit Blocks": 0,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.195,
"Triggers": [],
"Execution Time": 259.101
}
}