General concept
Let's see the general meaning of the word query:
request is:
1) Requesting, asking for any. information, explanations, etc. to business
If we delve into the use of this word, we will probably come to the conclusion that in one reference to something, there can be several requests, if there is such a possibility.
Although in essence, in common usage these are practical synonyms.
Analogy in real life
We give an analogy with a person, suppose you want to disturb someone with your question. Approach the person and speak:
- Tell me please, where can I find the nearest coffee house?
How many calls and requests are there? Right one! You once turned to the man.
- Tell me please, where can I find the nearest coffee house? And I wonder where there is a museum?
Yeah, there is still one appeal to a person, but there are already two requests. Then consider the situation from another plan:
- Tell me where can I find the nearest coffee house?
- The nearest coffee shop is at the end of this street.
- Thank! Tell me more, where can I find a grocery store?
How many calls and requests did you make to a person? Two each. That's right.
Database
It also works in the database, you access the database, but you can send several requests at once in one call to reduce data transfer costs, if there is a possibility in the driver, if no further actions in the code depend on the execution of this request.
If there are a lot of queries on INSERT, then it is probably better to fit them into one construct in order to speed up the insertion.
INSERT INTO table VALUES (1,2,3,4), (1,2,3,4);
Unless of course this is supported by the database syntax, then there will be one query and one hit.