Database Query Performance

Discussions center on challenges with slow database queries in large datasets, optimization techniques like indexing and query restructuring, and debates over bottlenecks such as IO limits, CPU usage, and whether computations should be handled inside or outside the database.

📉 Falling 0.4x Databases
4,392
Comments
20
Years Active
5
Top Authors
#4503
Topic ID

Activity Over Time

2007
14
2008
52
2009
74
2010
125
2011
157
2012
143
2013
226
2014
132
2015
176
2016
227
2017
258
2018
222
2019
268
2020
303
2021
432
2022
404
2023
501
2024
351
2025
305
2026
22

Keywords

RAM e.g PHP CPU GIL CTE BEGIN SQL cra.m OMG query queries database rows table tables db tenants orm joins

Sample Comments

Someone1234 May 12, 2016 View on HN

There's nothing to complain about with this. But aren't most large database queries ultimately IO capped, rather than CPU capped? Wouldn't this just put more load on the IO and it would just bottleneck there?

gajus Mar 19, 2020 View on HN

Wouldn't this drastically increase database latency?

iLoch Jun 15, 2016 View on HN

Might be because it requires more complex database querying and/or is less cacheable.

spicybright Apr 15, 2021 View on HN

Sounds like a pain for larger databases.

sorokod Sep 13, 2017 View on HN

This is about the complexity of queries (which, without knowing your system, may be unbound) - rate limiting will not help.

ibotty Mar 25, 2013 View on HN

please show these 50x faster queries. really. i am curious.

vecter Oct 22, 2025 View on HN

What're some DB query performance issues you've run across in the past and how did you resolve them?

ReflectedImage Mar 26, 2021 View on HN

It's really slow compared to normal SQL databases

kls Dec 6, 2011 View on HN

Are you running a relational database? if so check all of your indexing. Unless you are doing some pretty crazy stuff indexing should reduce those queries to milliseconds.

jrockway Jul 2, 2009 View on HN

There are potentially two problems:Your database's query optimizer sucks, orThe overhead is of object inflation, not a slow SQL query.