Hi I have a table with a primary:
PRIMARY KEY(`x`,`y`,`Version`,`Revision`)
On table like:
`x`,`y,`version`,`revision`,`data`
x, y, version and revision all count up from zero.
I am trying to figure out how to return the highest revision and its data for every version, given a specifiy x and y. And what indexes could I make to speed it up?
Try this query –
…to speed up the query you may add indexes on Version and Revision fields. Anyway – you should analyze it using
EXPAIN SELECT...statement.