I'm writing a rest service. For each request I use about 4-8 queries.
Should I try to refactor those into a single query?
|
It very much depends on the data. However what you really really want to avoid is getting a number of rows from one query and then for each row firing of a second query for each row returned. In this situation a single join query will perform an order of magnitude faster than several individual queries. |
|||
|