{"repo":"aarondfrancis/fast-paginate","free":true,"listed":false,"github":"https://github.com/aarondfrancis/fast-paginate","clone":"git clone https://github.com/aarondfrancis/fast-paginate.git","description":"A fast implementation of offset/limit pagination for Laravel.","language":"PHP","stars":1372,"topics":["laravel","pagination"],"license":"MIT","category":"databases-storage","readme_excerpt":"Fast Paginate for Laravel About This is a fast limit / offset pagination macro for Laravel. It can be used in place of the standard paginate methods. This package uses a SQL method similar to a \"deferred join\" to achieve this speedup. A deferred join is a technique that defers access to requested columns until after the offset and limit have been applied. In our case we don't actually do a join, but rather a where in with a subquery. Using this technique we create a subquery that can be optimized with specific indexes for maximum speed and then use those results to fetch the full rows. The SQL looks something like this: You might get an error trying to run the query above! Something like This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery. In this package, we run them as two separate queries to get around that! The benefits can vary based on your dataset, but this method allows the database to examine as little data as possible to satisfy the user's intent. It's unlikely that this method will ever perform worse than traditional offset / limit , although it is possible, so be sure to test on your data! If you want to read 3,000 words on the theory of this package, you can head over to aaronfrancis.com/2022/efficient-pagination-using-deferred-joins. Installation This package supports Laravel 10, 11, and 12, and requires PHP 8.2 or higher. To install, require the package via composer: There is nothing further you need to do. The service provider will be l","default_branch":null,"files":null,"tree":[],"storefront":"/r/aarondfrancis","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aarondfrancis/fast-paginate/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."}