Well yeah.. it was a little bit more complex thing than i wrote. Sorry for inconvenience, didn't express myself as i meant to. I had to rearrange result arrays too and grouped em by one more var from db. But did it anyway...
Speed of databases is related to hardware, optimisation, amount of data, database schema, and query tuning to name a few.
Using "SELECT * FROM blah" on a database with a million or so rows and no index would be a little slow, to say the least, and probably halt the server!