if you use SQL, dependes on
1) how you design table indexes
2) how you design SQL statement which can use correct indexes.
for Example: SELECT * FROM xxxx a
JOIN xxxx b ON ....
JOIN xxxx c ON .....
WHERE .....
sometimes this kind of SQLs may use indexes (if they have multiply
indexes), but not correct one, if we change a little bit
let's say change it to LEFT JOIN, ..., and so on,
it would use the correct index and return the same result instantly.
sometimes even you think it should use THIS or THAT index, but it doesn't,
then you have to give the hints, for example:
SELECT ... FROM xxx a
JOIN xxxx b ON ....
WHERE a.PrimaryKey = a.PrimaryKey AND .....
the trick how to know the SQL is the best one is the internal write count
should be 0 and it use correct index, then even more complex SQL would
cause only 0.001 seconds.
Design SQL statement is fun, but making it use correct index is more
fun.
I have designed large project which has millianns records by using
Interbase in U.S.A, it runs perfect.