Can i Make Index for all columns(No write operations)? Few days I just learned indexes.I my New app(running on node js) There will no write operation.And my server has 500mb of ram.Can I set Index to all of My column.I almost have 500K rows.My query is dead simple as Like this

SELECT * FROM users ORDER BY RAND() LIMIT 1


Limit may vary upto 10k According to users need.Right Now I am getting 0.6s In my 8Gb ram laptop.What would Happen if it is on 500Mb ram Server.Is it worth for Making Indexes in all table
This all depends on the size of the table. You're doing a full table scan without a where clause so an index isn't going to help. The use of the rand() function for sorting is going to produce a temp table and this will harm performance. If you have a primary key you could generate a random number in the app and perform a query where a single row is selected and can make use of the clustered index. You're likely to be serving this all from memory if you're using the InnoDB storage engine.