Any shortcut to get infotable length quickly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Any shortcut to get infotable length quickly
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
