I am using an Oracle function to retrieve data into Spotfire with a single input parameter. I get the output for the function in PL/SQL Developer in around 90 secs but when i try to open the same function added in Spotfire directly as a fucntion or added as an Information Link it is in loading state forever. Is there anything i can do retreive data in the same amount of time as the PL/Developer tool. In either case the calculation is in-DB and i dont know what might have gone wrong. I just got the output once in Spotfire, and not able to do the same.
You are almost never going to beat the query time in a DB IDE / Developer Tool. There's just more that has to happen when you are consuming the data into Spotfire. First, the exact same execution has to happen on the DB side. While in PL/SQL Developer this is the end of the steps. When loading into Spotfire there are more steps (conversion, loading into memory, etc).
What could also be slowing down your load time is transformations, calculated columns, low RAM / CPU availability on the Spotfire DB Server, network bandwidth between your Oracle DB and the Spotfire DB, and so on...
So theoretically your problem could be represented with something like:
Normal Query Time + Network Latency + Resource Limitations + Spotfire Transformations + Other files being loaded in the analysis + unknowns...