R
R
roxik2017-09-07 23:42:21
MySQL
roxik, 2017-09-07 23:42:21

Is it normal for an API to use a query to output 4000 rows with MySQL?

We want to make an API where strings with MySQL in json will be displayed, there are ~ 4000 of them in total, is this normal? Isn't that a big load? Or still pagination?
Only a few fields are displayed.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Entelis, 2017-09-09
@roxik

> API for parsing to another resource. What do you say about this? The main thing that the DB did not lay down.
from 4000 records of a DB will not lay down.
on such a volume, it makes no sense to gamble with incremental updates, just give everything in one piece.
it makes sense to do pagination in client stories to save traffic, when there is a high probability that only part of the data is needed.

T
ThunderCat, 2017-09-08
@ThunderCat

The task to receive 4000 records? Then yes, for the server it will be faster to issue 1 time than 40 times 100. Otherwise, display as much as you need, you should never save resources on matches at the expense of code quality / usability.

U
UksusoFF, 2017-09-08
@UksusoFF

Unload everything once, and then kick a third-party site so that it goes and updates what has changed. For example, after updating one article, send them its ID - they make a request and update the information about this article, or immediately send changes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question