Forum Stats

  • 3,770,575 Users
  • 2,253,135 Discussions
  • 7,875,498 Comments

Discussions

Slow running inner query

2693537
2693537 Member Posts: 51 Blue Ribbon

Hi all,

I am running below sql inner query and it takes more to fetch results. Could you pls help me to write this sql query better way. Inner part of sql fetches the results 1 min, but after joining inner join time taking more than 15 mins.

select * from

(

Select ip_addr,

Payments_from_State 

from test_payments

where concat(year,month,day) between '20210901' and '20210910'

)payment

inner join ip_addess ip

on 1=1 and ip.country_name='xxxx';

Tagged:

Answers