Hacker Blogs
Work in progress: 15,409 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #1386

H

Haki Benita

Personal blog · hakibenita.comprogrammingdata

Haki Benita's personal blog at hakibenita.com covers programming and data. Since 2019, 53 different Hacker News readers have linked it 86 times, most often “Simple Anomaly Detection Using Plain SQL”. It is still writing: the last post was on 2026-07-08, and you can follow it by feed.

Visit the blog
86mentions?
53HN people?
2019–2026first – last linked?
Links on Hacker News per year · peak 26 in 2021

The writings of Haki Benita

Most-linked posts?

  1. Simple Anomaly Detection Using Plain SQL
    6 people · 6 mentions · first linked 2020-09-21
  2. Practical SQL for Data Analysis
    6 people · 6 mentions · first linked 2021-04-26
  3. Improve Serialization Performance in Django Rest Framework Including Banchmarks
    5 people · 5 mentions · first linked 2019-06-09
  4. Fastest Way to Read Excel in Python
    4 people · 4 mentions · first linked 2024-01-03
  5. Some SQL Tricks of an Application DBA
    4 people · 4 mentions · first linked 2020-07-27
  6. The surprising impact of medium-size texts on PostgreSQL performance
    4 people · 4 mentions · first linked 2020-10-20
  7. Re-Introducing Hash Indexes in PostgreSQL
    4 people · 4 mentions · first linked 2021-01-11
  8. Fast Way to Load Data into PostgreSQL Using Python
    3 people · 4 mentions · first linked 2019-07-09
  9. Handling Concurrency Without Locks
    3 people · 4 mentions · first linked 2022-06-09
  10. Lesser-known Postgres features
    3 people · 3 mentions · first linked 2021-11-08

What Hacker News says?

  1. The feed is here: https://hakibenita.com/feeds/all.atom.xml .

    Comment linking /feeds/all.atom.xml

    on “Lesser-known Postgres features”
  2. Submitted Lesser-known Postgres features as a story · 702 points

    HN discussion
  3. I want to stress the importance of not using id int SERIAL If you are on a somewhat recent version of postgres, please do yourself a favor and use: id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY An "identity column", the part here: https://hakibenita.com/postgresql-unknown-features#prevent-s... You might think this is trivial -- but SERIAL creates an "owned" (by a certain user) sequence behind the scenes, and s…

    Comment linking /postgresql-unknown-features

    on “Lesser-known Postgres features”
  4. Submitted Practical SQL for Data Analysis as a story · 602 points

    HN discussion
  5. OP has a pretty interesting writeup about why DRF model serialization is slow. https://hakibenita.com/django-rest-framework-slow

    Comment linking /django-rest-framework-slow

    on “FastAPI framework, high perf, easy to learn, fast to code, ready for production”
  6. Submitted Simple Anomaly Detection Using Plain SQL as a story · 512 points

    HN discussion
  7. CTE advice is somewhat questionable, as it is database specific. CTEs were for a very long time an optimization fence in PostgreSQL, were not inlined and behaved more like temporary materialized views. Only with release of PostgreSQL 12 some CTE inlining is happening - with limitations: not recursive, no side-effects and are only referenced once in a later part of a query. Mode info: https://hakibenita.com/be-carefu…

    Comment linking /be-careful-with-cte-in-postgre-sql

    on “Best practices for writing SQL queries”
  8. Submitted An unexpected find that freed 20GB of unused index space in PostgreSQL as a story · 375 points

    HN discussion
  9. He actually mentioned index de-duplication earlier: https://hakibenita.com/postgresql-unused-index-size#activati... If I had to guess, I would say that it doesn't accomplish anything (or as much as you'd think) for null values simply because there is no real data to store in either approach, you just have a bunch of pointers either way.

    Comment linking /postgresql-unused-index-size

    on “An unexpected find that freed 20GB of unused index space in PostgreSQL”
  10. Submitted Some SQL Tricks of an Application DBA as a story · 327 points

    HN discussion
  11. Here is an another article that expands on how Postgres stores text data. https://hakibenita.com/sql-medium-text-performance

    Comment linking /sql-medium-text-performance

    on “How PostgreSQL stores rows”
  12. Submitted Fast Way to Load Data into PostgreSQL Using Python as a story · 246 points

    HN discussion
  13. See this https://hakibenita.com/fast-load-data-python-postgresql

    Comment linking /fast-load-data-python-postgresql

    on “Some SQL Tricks of an Application DBA”
  14. Submitted The surprising impact of medium-size texts on PostgreSQL performance as a story · 182 points

    HN discussion
  15. Lately, I've been studying machine learning, from point zero, with a focus on time series analysis. Two months in already completed a course on Python and another book on Pandas, several hundreds of hours later in the fourth chapter in a book I paid for on deep learning and time series analysis they provided me with the most important information I needed: there is no evidence deep learning works better than traditi…

    Comment linking /sql-for-data-analysis

    on “TimescaleDB raises $40M”
  16. Submitted Common Mistakes and Missed Optimization Opportunities in SQL as a story · 179 points

    HN discussion
  17. Old is a harsh word, maybe mature would be a better fit, not everything new and shiny is gold, and yet not everything old sucks. Not arguing here about types and Pydantic being faster than the built in ModelSerializers. However, for serializer speed improvements and performance in DRF I would advise dropping ModelSerializers and either going for Serializers or plain dict. Haki Benita has a beautiful article on that…

    Comment linking /django-rest-framework-slow

    on “Modern JavaScript for Django developers”
  18. Submitted How to Get or Create in PostgreSQL as a story · 103 points

    HN discussion
  19. You might be interested in https://hakibenita.com/django-rest-framework-slow . If you weren't able to update to a 3.x version that has https://github.com/django/django/commit/a2c31e12da272acc76f3... , this might have bit you pretty hard.

    Comment linking /django-rest-framework-slow

    on “Django Async: What's new and what's next?”
  20. Submitted Exhaustiveness Checking with Mypy as a story · 85 points

    HN discussion
  21. I don't know if it's the same for MySQL, but in Postgres a CTE would possibly force the planner to make less efficient choices [1]. Would be interesting if someone who knows more than me could clarify on this [1] https://hakibenita.com/be-careful-with-cte-in-postgre-sql

    Comment linking /be-careful-with-cte-in-postgre-sql

    on “Faster offset pagination for Rails apps”
  22. Submitted How to Get Foreign Keys Horribly Wrong as a story · 68 points

    HN discussion
  23. See relevant section in the article: https://hakibenita.com/python-mypy-exhaustive-checking#the-f...

    Comment linking /python-mypy-exhaustive-checking

    on “Exhaustiveness Checking with Mypy”
  24. Submitted New Features in Django 3.2 as a story · 47 points

    HN discussion
  25. So many - I'm going to share a few that come to mind quickly, rather than agonizing over picking the best possible results. Tim Bray: https://www.tbray.org/ongoing/ Julia Evans: https://jvns.ca/ Tom MacWright: https://macwright.com/ Jacob Kaplan-Moss: https://jacobian.org/ Lea Verou: https://lea.verou.me/ Will Larson: https://lethain.com/featured/ Camille Fournier: https://skamille.medium.com/ Haki Benita: https://h…

    Comment linking /

    on “Ask HN: What are the blogs from which you learned most”
  26. Submitted Re-Introducing Hash Indexes in PostgreSQL as a story · 12 points

    HN discussion
  27. Some a prime example of a service that naturally peaks at round hours. We have a habbit of never scheduling long running processes at round hours. Usually because they tend to be busier. https://hakibenita.com/sql-tricks-application-dba#dont-sched...

    Comment linking /sql-tricks-application-dba

    on “Postgres Postmaster does not scale”
  28. Submitted Handling Concurrency Without Locks as a story · 7 points

    HN discussion
  29. I found this explanation very helpful: https://hakibenita.com/python-dependency-injection (if you program in Python)

    Comment linking /python-dependency-injection

    on “Ask HN: Concepts that clicked only years after you first encountered them?”
  30. Submitted Re-Introducing Hash Indexes in PostgreSQL as a story · 7 points

    HN discussion

Search all of HN for hakibenita.com

Linked by the same people?