Think of the PC and index as an easy way to force records in sorted order. Databases can search sorted data much faster than unsorted data (log n vs linear time).
The composite primary key is sorted in the order of the specified columns, so PK (ticket_id, entity_id) sorts ticket_id ASC, entity_id ASC . Since your PC already sorts ticket_ids, it spans the index on ticket_id .
However, sorting by entity_id ASC without any other columns results in a different sort order. If you need to query entity_id , MySQL will perform an index scan (search through each ticket id, then binary_searching the results to match entity_id). Your separate index in entity_id will make queries for entity_id much faster.
source share