Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

hmazter/database-view-benchmark

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Benchmark Database views for Laravel Eloquent

This repository is used to benchmark how Laravel Eloquent handles a database view for a model compared to a normal table.

Read the blog post here: https://www.hmazter.com/2018/09/using-database-views-as-tables-for-laravel-eloquent/

Installation

  1. git clone
  2. composer install
  3. copy .env.example and edit .env
  4. php artisan migrate --seed

Usage

Run one of these artisan commands using the unix time command:

fetch-posts-from-table-model  Fetch posts from the table model
fetch-posts-from-table-query  Fetch posts from the table with a query
fetch-posts-from-view-model   Fetch posts from the view model
fetch-posts-from-view-query   Fetch posts from the view with a query

ex:

time php artisan fetch-posts-from-table-model

About

This repository is used to benchmark how Laravel Eloquent handles a database view for a model compared to a normal table.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published