openpolitics.com

  • writing
  • quotes
  • Topics
    • academia
    • corruption
    • economics
    • education
    • environment
    • finance
    • history
    • hypertext
    • media
    • philosophy
    • psychology
    • religion
    • russia
    • ted nelson
  • about
← Previous Next →

100x faster Postgres performance by changing 1 line

SELECT c.key,
c.x_key,
c.tags,
x.name
FROM context c
JOIN x
ON c.x_key = x.key
WHERE c.key = ANY (VALUES (15368196), — 11,000 other keys –)
AND c.x_key = 1
AND c.tags @> ARRAY[E‘blah‘];
source: $link[host]

Tags: postgres, sql

Read Original Source

Tim Langeman © 2025 · Genesis Framework · WordPress · Log in