Yes, there is an issue. When you have a procedure in the FROM clause, it causes the join to happen in the SA engine ano not in IQ. Additionally, you are pushing data into the SA temp store which could fill up your default file system for it (typically /tmp).
Sometime this can be fast if the procedure is a single statement with no parameters. In most cases, though, they are too complex To be optimized.
Can you run the same query but break it into two pieces?
select * into #temp_table from sp_yourproc();
select * from main_table, #temp_table where ......
See what the performance is on that. If it is significantly faster then you know the issue is with the procedure. If performance didn't change, I'd be surprised if it didn't, then the issue is with the main table, indexes, etc.
Mark