logoalt Hacker News

the_biotyesterday at 11:29 AM5 repliesview on HN

What sort of things are people doing in their SQL queries that make them CPU bound? Admittedly I'm a meat-and-potatoes guy, but I like mine I/O bound.

Really amazed to see not one but several generic JIT frameworks though, no idea that was a thing.


Replies

vladichyesterday at 3:53 PM

Most databases in practice are sub-terabyte and even sub-100Gb, their active dataset is almost fully cached. For most databases I worked with, cache hit rate is above 95% and for almost all of them it's above 90%. In that situation, most queries are CPU-bound. It's completely different from typical OLAP in this sense.

martinaldyesterday at 11:35 AM

Anything jsonb in my experience is quickly CPU bound...

wreathyesterday at 12:35 PM

I think reading queries that are always served from cache are CPU bound because it also involves locking the buffers etc and there is no I/O involved.

throwaway140126yesterday at 11:33 AM

PostgreSQL is Turing complete, so I guess they do what ever they want?