Topic: Naudoti PDO ar MySQLi stambesniam projektui?
Sveiki,
PDO privalumai 12 duomenų bazių palaikymų, užklausų duomenų vertimas į objektus ir pan.
MySQLi daugeliu atvejų yra greitesnė
Iš čia paėmiau vieno vartotojo atliktus testus:
"SELECT NULL" -> PGO() faster by ~ 0.35 seconds
"SHOW TABLE STATUS" -> mysqli() faster by ~ 2.3 seconds
"SELECT * FROM users" -> mysqli() faster by ~ 33 seconds
Note: by using ->fetch_row() for mysqli, the column names are not added to the array, I didn't find a way to do that in PGO. But even if I use ->fetch_array() , mysqli is slightly slower but still faster than PGO (except for SELECT NULL).
Projektas bus didelis, darbuosiuosi su MySQL DB. Ką patartumėte? MySQLi ar PDO?
Ačiū.