Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help creating a composite index on MySQL plz Create a composite index on

ID: 3838715 • Letter: I

Question

I need help creating a composite index on MySQL plz

Create a composite index on the attributes last_name and first_name (in that order!) of the Bird table.

Paste your CREATE INDEX statement below.

variety income Peacock bdate Owns first name Bird bname latitude longitude ast locati Cno senti ment Utter Chirp 1 (Original M (Chirper) N (Copy) Parrots About Bird level Listen name N (Listener M interests Topics bsecto date User Topics Listen Watcher Signup date password emai add State country For Bird, Watcher ISA User: picture street Bird AND Watcher COVER User number mailcode

Explanation / Answer

In mysql indexing we have BTRee so we drill down BTREE to find the values in select query.

Following is the query

ALTER TABLE Bird

ADD INDEX compound(last_name,first_name);

id: 1

select_type: SIMPLE

table: Bird

type: ref

possible_keys: compound

key: compound

key_len: 200 here this is length of both fields together

ref: const,const

rows: 1

Extra: Using where

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote