index అనేది ఒక ప్రత్యేకమైన, sorted data structure (InnoDB లో ఒక B-tree), ఇది మొత్తం table ను scan చేయకుండా rows ను కనుగొనడానికి MySQL కు వీలు కల్పిస్తుంది. అది లేకుండా, ఒక lookup ప్రతి row ను చదువుతుంది (ఒక full table scan); అది ఉంటే, కొన్ని steps లో ఒక tree గుండా నడుస్తుంది.
Primary vs secondary
InnoDB లో table స్వయంగా primary key index అవుతుంది — ఒక clustered index. Rows భౌతికంగా primary-key క్రమంలో నిల్వ చేయబడతాయి, కాబట్టి primary key lookup నేరుగా పూర్తి row పైనే వస్తుంది.
