No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Enhancement: Row count query result in log

    Hi Isomorphic,

    I'm analyzing a situation a few days where I'm not sure if the data present in the table at that very time matches the data I'd expect.
    Knowing the total row count for fetches at that time would have helped me a lot.
    Could you include the resulting row count in this log entry?
    [builtinApplication.T_RESELLER_SALESAREA_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause
    [builtinApplication.T_RESELLER_SALESAREA_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause ORDER BY $defaultOrderClause
    [builtinApplication.T_RESELLER_SALESAREA_fetch] Eval'd row count query: SELECT COUNT(*) FROM T_RESELLER_SALESAREA ....
    ...normal further request processing...
    Thank you & Best regards

    That log is showing you the query we've put together based on configuration. The query isn't run at that time. Lower-level logging would show the row count, or you could log it yourself.


      Hi Isomorphic,

      I'm already at SQLDataSource=DEBUG log level. Are you sure there is the result logged somewhere at a finer level?

      By "yourself" you mean @Overriding executeFetch() and log from there, right?
      I could log totalRows for every fetch, which would be fine for me IMHO, but can you explain how I'd recognize the row count query and get the COUNT(*) column from it?

      Thank you & Best regards


        If we do a row count, it's reported as dsResponse.totalRows, which you can log.

        The SQLDataSource log reports SQL-specific stuff, you can also look at just the DataSource logs. The row count is reported there as dsResponse.totalRows. The log levels we ship by default actually include that log.