this query executing for longer time. Any idea on simplifying this query?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
this query executing for longer time. Any idea on simplifying this query?
While fetching data from sql db in thingworx , this query executing for morethan 80 seconds. Any idea on simplifying this query?
Query:
SELECT distinct a.cmp , a.engseq , a.it, null as COUNT
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
If you are going to display data in Mashup query only specific rows of data (using Limit Offset in Postgresql) and add pagination to Mashup.
Based on the Pagination number you can query the next set of rows from DB. This way you can decrease query time
More about Pagination Widget - Pagination Widget (Themable) (ptc.com)
/VR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AP_10343008
Could you please explain your use case?
Where exactly this query is used whether in Mashup or in business logic service
/VR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It is used in database connector thing to show output in mashup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AP_10343008
If you are going to display data in Mashup query only specific rows of data (using Limit Offset in Postgresql) and add pagination to Mashup.
Based on the Pagination number you can query the next set of rows from DB. This way you can decrease query time
More about Pagination Widget - Pagination Widget (Themable) (ptc.com)
/VR
