2021年5月6日星期四

how to index string column in laravel?

I have table customer_Settings which has column key ,value,id,customer_id

$table->integer('id);  $table->integer('customer_id');  $table->string('key');  $table->string('value`);  

Here is my query which i am using to get data

$customer_setting = CustomerSetting::select('customer_id','key','value')->where('customer_id', $customer_id)->where("key", $key)->get();  

My question is which type of indexing we should do on customer_settings table. full_text?

if yes we want to use whereIn on key column . I mean to say i will give an array of keys query needs to get data according to that

Any suggestions please

https://stackoverflow.com/questions/67428491/how-to-index-string-column-in-laravel May 07, 2021 at 11:03AM

没有评论:

发表评论