mauricio / postgresql-async

Async, Netty based, database drivers for PostgreSQL and MySQL written in Scala
Apache License 2.0
1.43k stars 222 forks source link

Fixed performance regression caused by treating all numbers as numerics #231

Open njeuk opened 7 years ago

njeuk commented 7 years ago

Change 90e4194adb2d02b229fcccdc754513e486518bb7 switched the types used for numbers in PreparedStatements to always be ColumnType.Numeric.

This causes an order of magnitude performance degradation, as shown by the test in this PR, also discussed in #179

The effect of reverting this change means that you cannot create a prepared statement using say integer types and then start passing doubles to it. Which would be a pretty dubious practice to do anyway!

oshai commented 6 years ago

I fixed/reverted this in jasync-sql(fork) 0.8.30: https://github.com/jasync-sql/jasync-sql/pull/16 . more details in the issue: https://github.com/jasync-sql/jasync-sql/issues/15