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)
    190comments
  2. We're gonna need a lot more mathematicians (terrytao.wordpress.com)
    29comments
  3. Ollaya – Ollama for open-source, Jev-style decision models (ollaya.dev)
    106comments
  4. Plan mode is dead (aymannadeem.com)
    182comments
  5. Show HN: Jev Plays Pokémon Red (jev-pokemon.vercel.app)
    76comments
  6. What even is an OS now? (sockpuppet.org)
    226comments
  7. Jury finds Facebook liable for deceiving users in Cambridge Analytica case (cbsnews.com)
    23comments
  8. Postgres SELECT DISTINCT Does Not Scale (dbos.dev)
    4comments
  9. One Piece of Flock Camera Data Put This Innocent Woman in Jail for 13 Days (jezebel.com)
    34comments
  10. Gravity seems holographic. What does that mean for reality? (quantamagazine.org)
    149comments
  11. Excel now supports multiple values in a single cell (techcommunity.microsoft.com)
    101comments
  12. Show HN: Hacker Atlas - A map of what Hacker News talks about (hackeratlas.com)
    8comments
  13. Two and a half years without a gallbladder (tracydurnell.com)
    10comments
  14. I wrote a ray tracer in Brainfuck (epestr.com)
    13comments
  15. Lab on a Contact Lens Can Measure Stress Through Serotonin (ieee.org)
    5comments
  16. Fourier Analysis: Drawing Llamas with Circles (adekau.github.io)
    —discuss
  17. First Principles Thinking (sunilsadasivan.com)
    104comments
  18. Remembering Johannes Doerfert (llvm.org)
    2comments
  19. U.S. appeals court upholds designation of Anthropic as supply chain risk (cnbc.com)
    735comments
  20. The Murky History of Soviet-Born Tetris (mitpress.mit.edu)
    —discuss
  21. How video games inspire great UX (2019) (jenson.org)
    16comments
  22. TiddlyInstall: A universal, reusable, install system (robertsdotpm.github.io)
    11comments
  23. An airport cooled by natural ventilation (theguardian.com)
    34comments
  24. Show HN: A game about fake news and memes (unspin.app)
    10comments
  25. Show HN: Make math automatic with Mathy (gmays.com)
    24comments
  26. Microsoft abandons personal AI chatbot race with Copilot reboot (bloomberg.com)
    93comments
  27. How we learned to stop worrying and love campus surveillance (fnl.mit.edu)
    95comments
  28. What happens when you analyze your favorite college football team like the CIA? (cultivatelabs.com)
    26comments
  29. Show HN: Ekselio – Loveable for finance workflows (local first) (gptbeyond.com)
    2comments
  30. Platform-independent SIMD in Go (go.dev)
    137comments

Postgres SELECT DISTINCT Does Not Scale

30 pointsby 1d agodbos.dev
4 comments
2h 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.

2h 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.

49m agoHN ↗

Did you even read the article? They show that a perfect index for their query didnt help because Skip Scan is currently not used for DISTINCT queries.