possibly to automatic detection of bad variable types in plans?
possibly to automatic detection of bad variable types in plans?
От:
Pavel Stehule <pavel.stehule@gmail.com>
Дата:
Hi
I have a talk with Alex Stanev about known issue that block indexes - bad param typespostgres=# do $$
declare _id numeric = 777722;
begin
perform * from bigtable where a = _id;
end;
$$;
DO
Time: 108,775 ms
postgres=# do $$
declare _id numeric = 777722;
begin
perform * from bigtable where a = _id;
end;
$$;
DO
Time: 106,111 ms
postgres=# do $$
declare _id int = 777722;
begin
perform * from bigtable where a = _id;
end;
$$;
DO
Time: 1,522 ms
postgres=# do $$
declare _id numeric = 777722;
begin
perform * from bigtable where a = _id;
end;
$$;
DO
Time: 108,287 ms
https://github.com/okbob/plpgsql_check/issues/32