logoalt Hacker News

kstrauseryesterday at 11:23 PM0 repliesview on HN

I'm willing to look the other way when N=1, and 0..n is a small number of values on an indexed column. As others have pointed out, sometimes it's difficult to merge two queries like `get_item_list()` and `get_items()` located in different parts of the code, especially if they cross service boundaries. It's ugly, but may be a completely tolerable situation as long as timing profiles and usage patterns show that it's not going to blow things up. So there, 1+N => 1+1 which isn't inherently scary.

It's when 1+N turns into 147 queries, one for each line of a table displayed on a web page, that it really chafes.