Answer the question
In order to leave comments, you need to log in
What is the optimal number of database queries in yii2?
Good day. I practice in yii2 and set myself the task of writing an admin panel. Before that, I wrote small admin panels for myself in a procedural style without frameworks. I am using yii2-admin module and rbac for user roles. And I found that this very module makes about 35 requests to the database. This is not counting the fact that my methods also work with the database, but there are only 2-4 queries. In total, there are 40 queries to the database for one action. Tell me is it okay? Isn't it too much for a small level project? For understanding, I’ll tell you in general terms what the admin panel is in terms of functionality.
3 user roles.
Accordingly, the admin has all the authority to CRUD
Well, each user on the personal page displays records belonging to him.
Generally that anything such global from a DB does not last.
Answer the question
In order to leave comments, you need to log in
What is the optimal number of database queries in yii2?
most likely there is a lazy load, you need a greedy one
https://habrahabr.ru/post/306248/
What is the optimal number of database queries in yii2?46
nothing such global is pulled from the databaseand if it stretches, then we introduce the "global pull coefficient" (KGT 0.3) . Total 46 * 0.3 = 13.8 queries in the database
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question