You need to select the maximum value of the primary key (id).
I make a request:
select id from peoples order by id desc rows 1; I get the query plan: PLAN SORT ((PEOPLES NATURAL))
same query but sorting direct:
select id from peoples order by id rows 1; I get the query plan: PLAN (PEOPLES ORDER RDB$PRIMARY43)
How to force Firebird 2.5 to use an index when reverse sorting?
PS: if you create an additional index by id , then when you query this newly created index is used.