Skip to content

Add to debug logging in the jdbc integration module the information about the data loading process #455

@zaleslaw

Description

@zaleslaw
  • number of loaded rows
  • total number of rows in the table/query
  • number of data/size of data calculated by footprint in memory, number of columns and its types

This functionality could be auto-enabled for all tables or only for huge tables with many rows, also will be great to ask about the stat in alternative ways rather than proposed below:

// Your original query
val originalQuery = "SELECT * FROM your_table_name WHERE column_name = 'some_value'"

// Query to count the number of rows
val countQuery = "SELECT COUNT(*) as count FROM (" + originalQuery + ") AS count_query"

// Create a statement and execute the count query
val countStatement = connection.createStatement()
val countResultSet = countStatement.executeQuery(countQuery)

// Get the row count
val rowCount = 0
if (countResultSet.next()) {
    rowCount = countResultSet.getInt("count")

Metadata

Metadata

Assignees

Labels

databasesJDBC related issuesenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions