{"repo":"biiiiiigmonster/hasin","free":true,"listed":false,"github":"https://github.com/biiiiiigmonster/hasin","clone":"git clone https://github.com/biiiiiigmonster/hasin.git","description":"The 'hasin' is an imitator of 'has' in laravel orm relationships, but it's faster.","language":"PHP","stars":154,"topics":["php","hasin","laravel"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"English 中文 LARAVEL HASIN The hasin is composer package based on where in syntax to query the relationship of laravel ORM , which can replace has based on where exists syntax in some business scenarios to obtain higher performance. Installation Laravel Version Install command ----------------- ----------------------------------------------------- Laravel 12 Laravel 11 Laravel 10 Laravel 9 Laravel 5.5 8 Introductions The relationship of laravel ORM is very powerful, and the query has based on the relationship also provides us with many flexible calling methods. However, in some cases, has is implemented with where exists syntax. For example: select from users where exists (select from posts where users.id = posts.user id) 'exists' is a loop to the external table, and then queries the internal table (subQuery) every time. Because the index used for the query of the internal table (the internal table is efficient, so it can be used as a large table), and how much of the external table needs to be traversed, it is inevitable (try to use a small table), so the use of exists for the large internal table can speed up the efficiency. When the User table has a large amount of data, there will be performance problems, so the where in syntax will greatly improve the performance. select from users where users.id in (select posts.user id from posts) 'in' is to hash connect the appearance and inner table, first query the inner table, then match the result of the inner table with the appeara","default_branch":null,"files":null,"tree":[],"storefront":"/r/biiiiiigmonster","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/biiiiiigmonster/hasin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}