Tag: Sql

8 entradas encontradas

Cómo PostgreSQL estima tus consultas (y por qué a veces se equivoca)

Cómo PostgreSQL estima tus consultas (y por qué a veces se equivoca)

11 min de lectura

Toda consulta empieza con un plan. Toda consulta lenta probablemente empieza con uno malo. Y más a menudo de lo que crees, las estadísticas son las culpables.

Pero ¿cómo funciona realmente? PostgreSQL no ejecuta la consulta para averiguarlo — estima el coste. Lee datos precalculados de pg_class y pg_statistic y hace los cálculos para encontrar la ruta más barata hacia tus datos.

En el escenario ideal, los números que lee son precisos y obtienes el plan que esperas. Pero cuando están desactualizados, la situación se descontrola. El planificador estima 500 filas, planifica un nested loop, y se encuentra con 25,000. Lo que parecía un plan óptimo se convierte en una falla en cascada.

How PostgreSQL Estimates Your Queries (And Why It Sometimes Gets It Wrong)

How PostgreSQL Estimates Your Queries (And Why It Sometimes Gets It Wrong)

11 min de lectura

Every query starts with a plan. Every slow query probably starts with a bad one. And more often than not, the statistics are to blame. But how does it really work?

PostgreSQL doesn’t run the query to find out — it estimates the cost. It reads pre-computed data from pg_class and pg_statistic and does the maths to figure out the cheapest path to your data.

In the ideal scenario, the numbers read are accurate, and you get the plan you expect. But when they’re stale, the situation gets out of control. The planner estimates 500 rows, plans a nested loop, and hits 25,000. What seemed like an optimal plan turns into a cascading failure.

DuckDB: File Formats and Performance Optimizations

DuckDB: File Formats and Performance Optimizations

3 min de lectura

Lately I’ve been working quite a bit with DuckDB, and one of the things that interests me most is understanding how to optimize performance according to the file format we’re using.

It’s not the same working with Parquet, compressed CSV, or uncompressed CSV. And the performance differences can be dramatic.

Let’s review the key optimizations to keep in mind when working with different file formats in DuckDB.

Parquet: Direct Query or Load First?

DuckDB has advanced Parquet support, including the ability to query Parquet files directly without loading them into the database. But when should you do one or the other?

DuckDB: Formatos de archivo y optimizaciones de rendimiento

DuckDB: Formatos de archivo y optimizaciones de rendimiento

6 min de lectura

Últimamente estoy trabajando bastante con DuckDB, y una de las cosas que más me interesan es entender cómo optimizar el rendimiento según el formato de archivo que estemos usando.

No es lo mismo trabajar con Parquet, con CSV comprimido, o con CSV descomprimido. Y las diferencias de rendimiento pueden ser dramáticas.

Vamos a revisar las optimizaciones clave que hay que tener en cuenta cuando trabajamos con diferentes formatos de archivo en DuckDB.

AgentHouse: Cuando las bases de datos empiezan a hablar nuestro idioma

AgentHouse: Cuando las bases de datos empiezan a hablar nuestro idioma

5 min de lectura

Hace unos meses, cuando Anthropic lanzó su protocolo MCP (Model Context Protocol), sabía que íbamos a ver integraciones interesantes entre LLMs y bases de datos. Lo que no esperaba era ver algo tan pulido y funcional como AgentHouse de ClickHouse tan pronto.

Tengo planificado probar esta demo en breve, pero ya solo leyendo sobre ella me parece fascinante la idea de poder preguntarle a una base de datos cosas como “¿cuáles son los repositorios más populares de GitHub este mes?” y obtener no solo una respuesta, sino visualizaciones automáticas.

AgentHouse: When databases start speaking our language

AgentHouse: When databases start speaking our language

5 min de lectura

A few months ago, when Anthropic launched their MCP (Model Context Protocol), I knew we’d see interesting integrations between LLMs and databases. What I didn’t expect was to see something as polished and functional as ClickHouse’s AgentHouse so soon.

I’m planning to test this demo soon, but just reading about it, the idea of being able to ask a database questions like “What are the most popular GitHub repositories this month?” and getting not just an answer, but automatic visualizations, seems fascinating.

Apache Iceberg v3: Revolución en Datos Geoespaciales para el Analytics Moderno

Apache Iceberg v3: Revolución en Datos Geoespaciales para el Analytics Moderno

10 min de lectura

Apache Iceberg v3: Revolución en Datos Geoespaciales para el Analytics Moderno

La reciente ratificación de la especificación Apache Iceberg v3 marca un hito significativo en el ecosistema de datos abiertos, especialmente en el ámbito de los datos geoespaciales. Esta actualización no solo consolida a Iceberg como el estándar líder en formatos de tabla abiertos, sino que introduce capacidades geoespaciales nativas que prometen transformar cómo manejamos datos de ubicación y mapeo a gran escala.

Apache Iceberg v3: Revolution in Geospatial Data for Modern Analytics

Apache Iceberg v3: Revolution in Geospatial Data for Modern Analytics

9 min de lectura

Apache Iceberg v3: Revolution in Geospatial Data for Modern Analytics

The recent ratification of the Apache Iceberg v3 specification marks a significant milestone in the open data ecosystem, especially in the realm of geospatial data. This update not only consolidates Iceberg as the leading standard in open table formats, but introduces native geospatial capabilities that promise to transform how we handle location and mapping data at scale.

The Challenge of Geospatial Data in the Current Ecosystem

Before diving into Iceberg v3’s innovations, it’s crucial to understand the fragmented landscape that existed in geospatial data handling. As Jia Yu, Apache Sedona PMC Chair and Wherobots Co-Founder notes, the final functionality is the result of exhaustive community research that reviewed numerous projects and technologies with geospatial support.