Subject very slow firebird embedded connection on a web application
Author Issam Boughanmi


i want to use a firebird embedded database in an core 2.1 web application

Windows 64 shared hosting
FbClient 6.4.0

here the code i am using to query the database :

        public string TestFBQuery()
            var r = "";
  string path =  AppDomain.CurrentDomain.BaseDirectory;
var connectionString = @"initial catalog=??DB??;server type=Embedded;user id=SYSDBA;character set=UTF8;pooling=False;client library=??lib??";

connectionString = connectionString.Replace("??DB??",path+"BDD\APP_DATABASE.gdb");
connectionString = connectionString.Replace("??lib??",path+"fbembed.dll");
         using (var connection = new FbConnection(connectionString))
        using (var command = new FbCommand("select count(*) from APP_OPTIONS", connection))
            r= command.ExecuteScalar().ToString();
            return r;

it work but very very slowly (about 1 minute !!!)

any idea on what can produce this , maybe something related to server ip or something like that ?

any help is welcome , thanks .