django

3 posts tagged “django”.

  1. 2025
  2. Closest locations to a point

    Here's a PostgreSQL SQL query that returns the closest locations to a point, based on a brute-force approach where the database calculates the distance (in miles) to every single row and then sorts by…

    1 min read
  3. 2024
  4. migrations.RunSQL.noop for reversible SQL migrations

    provides an easy way to create "reversible" Django SQL migrations, where the reverse operation does nothing (but keeps it possible to reverse back to a previous migration state without being blocked…

    1 min read
  5. 2023
  6. Enabling a gin index for faster LIKE queries

    I tried using a gin index to speed up queries against a column. PostgreSQL: More performance for LIKE and ILIKE statements provided useful background.

    1 min read