What is BLR?
BLR stands for Binary Language Representation. All SQL queries are translated from SQL into BLR before execution. When you create or alter a stored procedure, trigger, view or computed column, Firebird compiles the source code and stores it in such compiled way in the system tables. It also stores the original SQL you used, but it never actually uses it. Later when a stored procedure is executed Firebird simply executes that binary code without a need to compile it once again. Having precompiled BLR also reduces the dependencies on the database objects. For example, imagine you have tables:
CREATE TABLE t1 ( a integer, b integer );
CREATE TABLE t2 ( c integer );
and the following query in a stored procedure:
SELECT a, b
JOIN t2 ON t1.a = t2.c;
Later you can easily add a column named B to table T2, and stored procedure would still work even though the query itself would throw an error:
Ambiguous field name between table T1 and table T2
The reason that procedure still works it because SQL isn't processed anymore and BLR contains reference to field B from table T1.