I have a website project that I'm currently coding and I have a table storing information on cars. The table has information such as below, there is about 20 columns in the table, I just want to know what will be the fastest way to get all the column data from a row randomly. I know there is a " ORDER BY RAND() " but I have read that it's slow to use and I fear because of the large table that this may cause problems, is there an alternative.
I'm going to use MySQL with InnoDB but this can be changed if selecting random rows can be done more efficiently with an alternative database engine. The website will be coded using PHP(Potentially RubyOnRails) and the database will be filled from a Python Script that will scrape car information websites.
Table contains rows such as
CarTable -
- Car Name
- Car Manufacturer
- Door Numbers
- ...
- ...
- ...