From: Mark R. <ma...@la...> - 2011-08-31 08:57:41
|
On Tue, 30 Aug 2011 23:27:01 +0200, Fulvio Senore <ma...@fs...> wrote: > When I open a catalog (a Firebird database) the program executes a > number of queries to (partially) fill some tree controls that work like > folders in a file system. The queries are always very simple, something > like "SELECT * FROM Table WHERE someID = 5". The number of queries that > are executed when opening a catalog changes with the stored data: for my > own catalog the program executes approximately 600 queries. Unrelated to your actual problem: I don't know your database structure and requirements, but a query explosion to 600 queries for opening a catalog (which on the surface sounds easy) seems a bit excessive. Are you sure you aren't falling in the N+1 query trap, where 1 query could suffice? Mark |