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

Postgres SELECT DISTINCT Does Not Scale

47 pointsby 1d agodbos.dev
5 comments
3h 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.

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

13m agoHN ↗

nope - either gets you a HashAggregate, GroupAggregate, or Unique depending on whether the column/input is indexed/ordered

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