Hi I have more than 500k records in items table Its takes more than 9 seconds to execute this query ineed to make it milliseconds to execute this query using mysql index
$products = \App\items::with([
    'item_store' => function($query) {
        $query->select('size', 'item_id', 'item_store_id');
    },
    'pics' => function($query) {
        $query->select('img_url', 'item_id');
    },
    'brand' => function($query) {
        $query->select('item_id', 'brand_id');
    },
    'brand.brand' => function($query) {
        $query->select('brand_id', 'brand_name');
    }
])
    ->select('item_id', 'short_name', 'price', 'price_above')
    ->orderBy('Price', 'Asc')->whereIn('category_id', $arr)
    ->groupBy('Sku')
    ->paginate(20);
my database structure is [st] https://screenshots.firefox.com/JAmaKENMYRhQkEjx/ourweds.com
this is item table migration
Schema::create('item', function (Blueprint $table) {
            $table->bigIncrements('item_id');
            $table->string('item_name');
            $table->integer('Sku');
            $table->text('Description');
            $table->text('short_description');
            $table->text('category_id');
            $table->string('color');
            $table->double('price');
            $table->double('indian_price');
           $table->string('old_price');
           $table->string('indian_old_price');
            $table->timestamps();
        });
item eloquent model
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class items extends Model
{
    //
     protected $table = 'items';
      protected $primaryKey = 'item_id';
      protected $fillable = [
       'category_id',
       'item_name',
       'Sku',
       'Description',
       'short_description',
       'color',
       'kik_cash_percentage',
        'status',
          'price',
          'price_old',
          'indian_price',
          'short_name',
          'price_above',
          'short_name_alter',
          'availability'
    ];
    public function pics(){
  return $this->hasOne( 'App\item_pics', 'item_id' );
}
 public function item_store()
    {
        return $this->hasMany('App\item_store','item_id');
    }
     public function category()
    {
        return $this->belongsTo('App\categories','category_id');
    }
  public function brand()
    {
        return $this->hasOne('App\item_has_brand','item_id');
    } 
}
