Skip to content

Conversation

@LJW21-02
Copy link
Contributor

Major Changes

  • Fixed SQL file export logic to avoid redundant queries during high-frequency operations

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the SQL file export logic in IoTDB to eliminate redundant high-frequency queries that were executed during data export operations. The original implementation performed a SHOW TIMESERIES query for every single data point, which caused severe performance issues.

Changes:

  • Split the exportToSqlFile method into two specialized methods: exportToSqlFileWithAlignDevice for align-by-device queries and exportToSqlFileWithoutAlign for regular queries
  • Removed the redundant SHOW TIMESERIES query that was executed for each row in the original implementation
  • Simplified the file writing logic to use prepared SQL prefixes and avoid nested loops

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants