while I haven't looked at MySQL source, I should download it some time, see some ways I could optimise my queries, although I would think if its a primary, unique field thats auto incremented, then I would think that It would already have it calculated the size of rows and amount to jump.
e.g.
addr=(DWORD*)(index*sizeof(table_t)+data_offset)
Although, that is doubt fall, if you use your own db type, ya, that would be easy and fast

Considering it would only need to do, the following.
go to first row
check field if value is this if true use if not continue
There is a few simple instructions involved here, CMP, JZ, ADD and JMP
0x00000001: CMP DWORD PTR [EAX], index
0x00000002: JZ 0x000000005
0x00000003: ADD EAX, 0x00000004
0x00000004: JMP 0x00000001
0x00000005: RET
Although, there is likely to be other things that MySQL uses, although it might create its own code for the queries, but it also has debugging, and stuff, and checking for the end of the data, but thats about as simple as things could get.
If its just an integer it should work fine comparing the data, even if you went as far as doing QWORDs it shouldn't generate that much of a loose that you can see it, just don't be like some and use a string.
If it does run bad, I recommend find some way to optimise your code or get a new processor, or ram if it moves it all to the ram and its slow, or your hdd if its slow reading that, well there could be all sorts of things, processor mainly..