Answer the question
In order to leave comments, you need to log in
What is the best way to create a request to the database: sculpt one big one or produce small ones?
There is a SQL server base with a couple of dozen tables.
For one of the tasks of the interface, it is required to select a large piece of data from 8 tables at once. Moreover, the operation is one-time and quite rare.
What is the best way to make a request?
Do a large selection with a dozen subqueries and all sorts of JOINs, or is it better to do a dozen separate SELECTs?
PS I'm new to SQL and, like many programmers, I suffer from premature optimization.
Answer the question
In order to leave comments, you need to log in
Here the question is in speed and my own choice, I tested that a single SQL query is faster and broken into successive iterations, in both cases I won sequential + they were less gluttonous to resources.
You can always test it yourself, and understand what is faster, I voiced my opinion -)
Fill in your structure with 10,000,000 additional. records and compare.
Right or wrong is a difficult question.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question