1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Rep Power

    Question Firebird Logging

    Does firebird have any form of logging facilties? I'm particulary interested in knowing which queries are being run against the database and how long they take to run.

    I am running Firebird 1.5 superserver on windows.

    I have about 90 users. The database server is maxing out on the CPU when some slow queries (queries not optimsed by good use of indexes) are run. I need to know which queries are causing the problem.

    The database has over 100 tables and over 300 stored procedures. We use a front end dephi application that has over 160 different screens. So tracking down which screen is causing the problem is proving difficult.

  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Outside US
    Rep Power
    Certainly not on an old version, monitoring through SQL has been added in Fb 2.1 (current production/stable version) and improved in Fb2.5 (currently beta quality).
    You might want to set up a test system with the latest stable version.

    Comments on this post

    • mariuz agrees
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Carlsbad, CA
    Rep Power
    With the complexity you describe, there may not be a "magic wand" quick solution.

    In addition to paloj's (best) solution I would hope the following might yield some benefits.

    Use user experiences plus your own deductive powers based upon your knowledge of the schema and SQL to make some logical guesses about the problem queries.
    Check the execution plans of those queries to see if they are doing full table scans etc.
    a. Are they using indexes available?
    b. Can you add indexes?
    c. Can you re-write the SQL better?
    d. Are the statistics for the indexes up to date so the optimizer knows their current cardinality?

    You probably know all the solutions; but it never hurts to be reminded of some of them.

    Good luck,


IMN logo majestic logo threadwatch logo seochat tools logo