Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
We fetched 5000 rows and 4 columns from sql db in 40seconds.
Then In Thingworx code, if i used InfoTable.length to find total number of rows in table is taking additional 20seconds.
Any other shortcut to get table length quickly.?
Query:
SELECT distinct a.cmp , a.engseq , a.it, null as totalrows
FROM ENGINEERING a
WHERE a.MODEL like 'R24R%'
AND a.cmp not in (
select cmp
from ENGINEERING
where MODEL like 'R23R%' ) ;
Solved! Go to Solution.
Hi @AP_10343008
You can try
infoTable.rows.size()
but I'm not sure whether it will improve performance. Please do a comparison between the size and length
For 5 Rows of Data, Size() runs faster than the length method
Difference between Size() & length - https://www.geeksforgeeks.org/what-is-the-difference-between-array-size-and-array-length-in-javascript/
/VR
Hi @AP_10343008
You can try
infoTable.rows.size()
but I'm not sure whether it will improve performance. Please do a comparison between the size and length
For 5 Rows of Data, Size() runs faster than the length method
Difference between Size() & length - https://www.geeksforgeeks.org/what-is-the-difference-between-array-size-and-array-length-in-javascript/
/VR
I find it strange that infoTable.length would take additional 20 seconds, if run just once.
Can you share all the service code where you observed this situation?