Convert Integer、Long、Short、Float and Double to Numeric , and the attribute of table is Integer or Long, If you use preparedStatement , and will causes larger performances problems.
e.g
Having table users, and has attribute uid with primary key.
use statment and find searching by index
explain analyse select * from users where uid in (200,500,800);
use preparedStatement with correct paramter type, and find searching by index
PREPARE fooplan (int, int, int) AS
select *
from users
where uid in ($1, $2, $3);
explain analyse EXECUTE fooplan(200, 500, 800);
use preparedStatement with wrong paramter type, and find searching by seq
PREPARE fooplan1 (numeric, numeric, numeric) AS
select *
from users
where uid in ($1, $2, $3);
explain analyse EXECUTE fooplan1(200, 500, 800);
https://github.com/mauricio/postgresql-async/blob/master/postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/column/PostgreSQLColumnEncoderRegistry.scala#L33
Convert Integer、Long、Short、Float and Double to Numeric , and the attribute of table is Integer or Long, If you use preparedStatement , and will causes larger performances problems.
e.g Having table users, and has attribute uid with primary key.