{ "phase": "after", "generatedAt": "2026-07-12T23:09:21.440Z", "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": 256.495, "Actual Total Time": 262.004, "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": 175, "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": 256.494, "Actual Total Time": 261.983, "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": 175, "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": 230.682, "Actual Total Time": 230.684, "Actual Rows": 20, "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": 175, "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": 218.01, "Actual Total Time": 218.011, "Actual Rows": 25, "Actual Loops": 1, "Sort Method": "top-N heapsort", "Sort Space Used": 53, "Sort Space Type": "Memory", "Shared Hit Blocks": 55, "Shared Read Blocks": 15040, "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": 217.932, "Actual Total Time": 217.934, "Actual Rows": 25, "Actual Loops": 1, "Sort Method": "top-N heapsort", "Sort Space Used": 54, "Sort Space Type": "Memory", "Shared Hit Blocks": 64, "Shared Read Blocks": 15033, "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.457, "Actual Total Time": 214.596, "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": 148, "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.548, "Actual Total Time": 203.479, "Actual Rows": 35884, "Actual Loops": 1, "Shared Hit Blocks": 44, "Shared Read Blocks": 15035, "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.691, "Actual Total Time": 204.382, "Actual Rows": 36969, "Actual Loops": 1, "Shared Hit Blocks": 48, "Shared Read Blocks": 15033, "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": 262.067 } }