Subject Re: Multithreaded Database
Author Roman Rokytskyy
> I Mean i wish that fb could handle multiple query without impacting
> each other, if one does heavy query, won't affect the other query,
> without having my code to create multi threaded application. Well it
> just my wish.

Well, you can't avoid to create multithreaded application simply
because your programming language will require this. Look, when you
have something like this (Java syntax, but it does not matter):

ResultSet rs = statement.executeQuery("SELECT * FROM some_big_table");
while(rs.next()) {
...
}

At the point when the executeQuery is called, your program stops until
the response comes from the server. Assume that the execution returns
from the call instantly, however the server has not finished computing
the data. Then your program must wait until the data come by looping
internally and checking some flag like statement.areDataThere(). At
the end your code will look like old message handler code from the
Borland Pascal 7.0 for Windows 3.1.

The multithreaded application is much more easy approach to code and
to debug.

The only thing that Firebird could have improved at this place is that
same connection can be used by multiple threads simultaneosly. However
the implementation effort and the complexity for multiplexing the
network socket is so high, that it is much more better to invest that
time in more important areas, especially when opening a new connection
in Firebird is very cheap operation.

Roman