That limit 254000,1 will never be fast, and it will continue to get slower as you scale your application up. Faster discs, more ram, all that might help, but when you get to a large enough dataset you won't be able to use that anymore. It's a bad way to get what you want. If you have a lookup table for it you can index that, and have a no gap sequence of numbers there, it's much faster.
For instance, suppose big table has 254000 records, with various scattered id numbers, like 1,200,450,230,124,4000,1234 and so on (assuming you're using order by to get the order you like, that's the sequence we see of ids) You make a lookup table like this:
create table lookup (id serial primary key, bigtableid int);
insert into lookup (bigtableid) (select bigtableid from bigtable order by somethingorother);
Note the use of a postgresqlism there, the serial type. It's autoinc in mysql...
Now, you can do something like:
<?php
$count = 254000; # you can get this by doing a select max(id) from lookup...
$i = rand(1,254000);
$query = "select * from bigtable where bigtableid=$i";
# more code here...
?>