Logstash(with input-jdbc) always sync ALL data into elasticsearch even the condition is false

Sorry for the delay.
Thank you so much for your reply.

I have solved this last week, Indeed,it's sth wrong with timestamp.
In my case,the different is that the default timezone of Logstash is UTC, which is different from my district, so the ":sql_last_value" is always smaller than "es_timestamp".

I just changed the SQL file to this:

select * from channel where es_timestamp > date_add(:sql_last_value,interval 8 hour)

Thank you!