how to get users with booking count in laravel without using withcount because there is a bad performence with large database
how to get users with booking count in laravel without using withcount because there is a bad performence with large database
is there is any thing best performance than this ?
The bad performance is not coming from using withCount but rather from when you do ->get() because you are trying to do that for ALL the users in the database. So a better performance will be if you paginate your results: