Hi Carlos, thanks for doing this. We really need it.
I’ve been using Firebird since 2006 with CI, but never used the native CI libraries for this because of poor performance. The CI libraries, from what I’ve seen and from a cursory review of your code as well, uses the COUNT(*) command to determine max number of rows so that pagination can be supported. This works great in MySQL but in Firebird as you probably know, as is the case with any other version supported database, is really bad in performance.
I took a quick look at your code and I see that you are using the COUNT(*) basis for this with queries, and I suspect you’ll encounter the very same issues I found with this - queries are REALLY slow for large table sets. I’m not sure what the answer is to address this, but I ended up writing an entire separate library based on some existing code, and with the help of Firebird expert Alan McDonald, to do this that is based around the EZSql code libraries, and since pretty much all of my queries are done to stored procedures, I can get this to work fine for performance.
I’m not sure if you have any ideas of how to get around avoiding using COUNT(*) altogether, but I think its needed if this is to perform with larger data sets (ie. more than 20,000 rows in a query).