Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3.27
-
None
-
Debian Buster
Description
I know it may not be a bugg.
Here what I observed:
CREATE FUNCTION GetName() RETURNS VARCHAR(128) |
DETERMINISTIC
|
BEGIN
|
RETURN (SELECT name FROM MyVIEW WHERE id1=26 AND id2=30); |
END
|
SELECT GetName();
|
Execution last few ms.
CREATE FUNCTION GetName(id_1 INT, id_2 INT) RETURNS VARCHAR(128) |
DETERMINISTIC
|
BEGIN
|
RETURN (SELECT name FROM MyVIEW WHERE id1=id_1 AND id2=id_2);
|
END
|
SELECT GetName(26, 30); |
It last more than 8 sec.
This view is full DETERMINISTIC. What can explain such a gap? Any ways to avoid this?
Regards,