Skip to content

Interpretation of of FbDatabaseInfo values for BlackbirdSql SqlEditor port. #1157

Description

@BlackbirdSQL

Hi,
This is not an issue but not sure where else to ask this. Hope you can help.

I have been struggling to make sense of some of the values returned from FbDatabaseInfo which I am using in the BlackbirdSql DDEX extension's SqlEditor port.

  1. If you look at the snapshot trials the GetReadIdxCount() and GetReadSeqCount() values are returning huge numbers even after the cumulative values have been subtracted (see attached). Could you tell me what these values represent?
  2. GetReads() consistently returns zero. Am I missing a trick here?
  3. Is there some way of extracting the Server Execution Time of a query?

The extension is already released but I would like to jack up the stats reporting so that they're more useful.

Appreciate if you could help me out here. Thanks.
Greg

FirebirdSqlEditorStatistics

Activity

  1. cincuranet commented on Feb 1, 2024

    @cincuranet
    Member

    1 & 2> Yeah. Looks like these methods are returning complete garbage. I guess, I'm parsing the response back incorrectly. I'll check and fix it.
    3> I don't know from top of my head. But you can maybe check the isc_info_xxx or fb_info_xxx in Firebird sources whether something looks "suspicious". And if so, let me know and I'll add it.

  2. self-assigned this
    on Feb 1, 2024
  3. BlackbirdSQL commented on Feb 2, 2024

    @BlackbirdSQL
    Author

    Thanks Jiri,

    I have had a look through the isc codes but there's nothing that would return a server execution time. There was something elsewhere that returned a long that implied user server stats, and that I spent some time trying to decipher. Now I can't find it. I'll get back to you when I do.

    Microsoft SqlServer does include "request cost" in it's SqlEditor stats. I see there is an isc code "isc_info_request_cost". It would be great if you could include that when you have some time.

    Regards, Greg

  4. BlackbirdSQL commented on May 10, 2024

    @BlackbirdSQL
    Author

    Okay so the majority of the isc codes return a struct with an array of value pairs. I am using Reflection atm to access the Version10.GdsDatabase::DatabaseInfo() method to get to the response buffer.
    The structure of the buffer is as follows:

    Byte 0 contains the isc code.

    Bytes 1 and 2 contain the 16 bit UInt16 byte size of the value pairs array.

    Following that is the value pairs array.

    Each value pair consists of a 6 byte block as follows:
    The first 2 bytes are the 16 bit UInt16 ID of the affected/applicable table.
    The next 4 bytes are the 32 bit UInt32 value pertaining to the table for the isc code.

    This means that the total number of value pairs is the byte size of the array / 6.

    If you could expose the DatabaseInfo() method in FbDatabaseInfo with a public access modifier that would be helpful.

    Cheers, Greg

  5. cincuranet commented on May 13, 2024

    @cincuranet
    Member

    Instead of exposing GetDatabaseInfo (I assume you're really talking about this one) it makes more sense to me to have an implementation of that call and parsing/processing in FbDatabaseInfo . Feel free to create PR with the implementation.

  6. BlackbirdSQL commented on May 14, 2024

    @BlackbirdSQL
    Author

    Yeah yeah that's what I meant.

  7. added a commit that references this issue on Jun 28, 2024
    1fd2464
  8. added theissue type on Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions