• PostgreSQL Internals: TRUNCATE, Part 1

    You can use TRUNCATE in postgres to delete all of the rows in a table. The main advantage of it compared to using DELETE is performance. For example, using DELETE to delete all rows in a table with 1 million rows takes about 2.3 seconds, but truncating the same table...

  • cstore_fdw and 'Files are Hard'

    I recently came accross the “Files are hard” article, and it made me wonder how reliable is cstore_fdw’s design and implementation. cstore_fdw is a columnar store for PostgreSQL that I designed and developed in my previous job at Citus Data. I am writing this post so my decisions for cstore_fdw’s...

  • Haskell Skyline

    Recently I started learning Haskell by studying the Intro to FP Programming course on Edx. Since then, I try to model different problems using Haskell. One of these problems is the Skyline problem, which goes like this: You are given a set of rectangular buildings in a city, and you...