shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

sharding table uses a large number of union all, Actual SQL table name problem

Open wting1123 opened this issue 11 months ago • 3 comments

version

shardingsphere-jdbc-core-spring-boot-starter 5.2.1

config

image

Logic SQL

select count(0) from ( select * from device_alarm where alarm_time <= ? AND mac_sn = 001 union all select * from device_alarm where alarm_time >= ? AND alarm_time <= ? AND mac_sn = 002 union all select * from device_alarm where alarm_time >= ? AND alarm_time <= ? AND mac_sn = 003 union all select * from device_alarm where alarm_time >= ? AND alarm_time <= ? AND mac_sn = 004 union all select * from device_alarm where alarm_time >= ? AND alarm_time <= ? AND mac_sn = 005 union all select * from device_alarm where alarm_time >= ? AND mac_sn = 006 ) table_count

image

Actual SQL

image

wting1123 avatar Mar 18 '24 09:03 wting1123

image

wting1123 avatar Mar 18 '24 09:03 wting1123

Hi @wting1123 Thanks for your feedback, can you try the latest version 5.4.1?

RaigorJiang avatar Apr 01 '24 11:04 RaigorJiang

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.

github-actions[bot] avatar May 01 '24 20:05 github-actions[bot]

Closed due to no response. If this problem persists, please reopen it or submit a new one.

RaigorJiang avatar May 06 '24 14:05 RaigorJiang