Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Revealing the details of how OpenAI agents hacked Hugging Face (swarmtraces.org)
    160comments
  2. Ollaya – Ollama for open-source, Jev-style decision models (ollaya.dev)
    102comments
  3. Show HN: Jev Plays Pokémon Red (jev-pokemon.vercel.app)
    71comments
  4. Plan mode is dead (aymannadeem.com)
    138comments
  5. What even is an OS now? (sockpuppet.org)
    176comments
  6. Jury finds Facebook liable for deceiving users in Cambridge Analytica case (cbsnews.com)
    5comments
  7. Platform-independent SIMD in Go (go.dev)
    136comments
  8. Postgres SELECT DISTINCT Does Not Scale (dbos.dev)
    2comments
  9. Git-bug: Distributed, offline-first bug tracker embedded in Git (github.com/git-bug)
    101comments
  10. Excel now supports multiple values in a single cell (techcommunity.microsoft.com)
    87comments
  11. Why didn't anybody tell me about Redis hash slots? (verygoodsoftwarenotvirus.dev)
    5comments
  12. One Piece of Flock Camera Data Put This Innocent Woman in Jail for 13 Days (jezebel.com)
    19comments
  13. Gravity seems holographic. What does that mean for reality? (quantamagazine.org)
    137comments
  14. Remembering Johannes Doerfert (llvm.org)
    2comments
  15. Show HN: Hacker Atlas - A map of what Hacker News talks about (hackeratlas.com)
    6comments
  16. I wrote a ray tracer in Brainfuck (epestr.com)
    12comments
  17. First Principles Thinking (sunilsadasivan.com)
    100comments
  18. Lab on a Contact Lens Can Measure Stress Through Serotonin (ieee.org)
    3comments
  19. U.S. appeals court upholds designation of Anthropic as supply chain risk (cnbc.com)
    715comments
  20. Show HN: A game about fake news and memes (unspin.app)
    6comments
  21. TiddlyInstall: A universal, reusable, install system (robertsdotpm.github.io)
    5comments
  22. Fourier Analysis: Drawing Llamas with Circles (adekau.github.io)
    —discuss
  23. How video games inspire great UX (2019) (jenson.org)
    16comments
  24. How we learned to stop worrying and love campus surveillance (fnl.mit.edu)
    80comments
  25. Show HN: Ekselio – Loveable for finance workflows (local first) (gptbeyond.com)
    2comments
  26. Show HN: Make math automatic with Mathy (gmays.com)
    21comments
  27. What happens when you analyze your favorite college football team like the CIA? (cultivatelabs.com)
    25comments
  28. An airport cooled by natural ventilation (theguardian.com)
    29comments
  29. Microsoft abandons personal AI chatbot race with Copilot reboot (bloomberg.com)
    85comments
  30. Alan Kay: Shannon gave us a way of dealing with noisy channels [video] (youtube.com)
    24comments

Postgres SELECT DISTINCT Does Not Scale

10 pointsby 1d agodbos.dev
2 comments
28m agoHN ↗

"Postgres SELECT DISTINCT Does Not Scale"

Correct. This is documented in depth: DISTINCT sorts the results first.

The article's use case seems to imply the author did not know about GROUP BY, nor does it imply the author knew about indexes, nor ANALYZE. Postgres 18's new skip scan indexing also could help here, so ensuring the planner chooses that could help.

22m agoHN ↗

Would GROUP BY fix the issue?

The article explains that skip scan doesn't do anything here.

nor does it imply the author knew about indexes, nor ANALYZE

Indexes were talked about a lot, and they explicitly mentioned looking at the query plan.