An OS has almost nothing to do with the speed of your application, if that application is properly designed.
If you design your software speed-wise, then you should select the appropriate programming language. The lowest level and fastest would be Assembly, but there may not be enough knowledge 1. to create code, 2. to use higher level functions (like database operation) and development & debugging would be cumbersome and the application will not be cross compatible between OSs.
If you choose a compiled language that would run fast enough and would allow access for easier DB operations, but it might need a specific development environment, and some optimization. Between OSs you would have to recompile the application.
If you select an interpreted language, you may develop your program very fast, DB access would be available with no effort (if there is available library), but the nature of the interpreted languages is that they usually run slower than compiled languages. But you could try your application on a different OS without modification.
Every solution comes with advantages/disadvantages but the OS is indifferent (in terms of speed). For example a for loop
from 1 to 256 million is finished within 1 second in C but it takes 35 seconds
to complete in Ruby.