H
H
hbrmdc2015-08-04 16:36:31
Database design
hbrmdc, 2015-08-04 16:36:31

How to understand how high the load on the database will be for a particular query?

Let's say there is a webapp page on which an API request for one row from database table No. 1 occurs.
It contains ~10k rows and ~20 columns.
One of the columns contains a one-to-many relationship with table #2.
Table #2 contains ~1 million rows and 10 columns.
There are ~50 rows associated with table #1.
1. How to understand how much more load each request of one row from table No. 1 causes?
2. Please give an example of such a request, the processing of which will take more than a second.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2015-08-04
@hbrmdc

Any request will take more than a second on 386sx
To understand the load, you need to understand the capacity of the server. Instead of theoretical questions, take measurements.
For this, there are
1) load tests
2) architects who understand how the request works inside, and by the appearance of the request they can assume where the main load will be.
Just run tests by running 1, 10, 100, 1000 requests, measuring the time.

D
Dmitry Kovalsky, 2015-08-04
@dmitryKovalskiy

Yes, any request to generate report data. SELECT with a JOIN bundle, filtering, calling scalar functions, and it is possible that nested queries for each of the 10,000 rows.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question