Announcement

Collapse
No announcement yet.
X
  • 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?
    Code:
    [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
    [B][builtinApplication.T_RESELLER_SALESAREA_fetch] Eval'd row count query: SELECT COUNT(*) FROM T_RESELLER_SALESAREA ....[/B]
    ...normal further request processing...
    Thank you & Best regards
    Blama

    #2
    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.

    Comment


      #3
      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
      Blama

      Comment


        #4
        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.

        Comment

        Working...
        X