You can translate the question and the replies:

Flatten View to JSON Array Structure

I have joined three tables from oracle DB and projected two columns in each table. Now I tried to expose this as a JSON REST service endspoint. I have modified the output JSON structure, From the flattern view to JSON Array. Something like below. { 'key1':'value1', key2:[ { 'subkey1':'subval1', 'subkey2':'subval2' }, {......... }, . ......] } I did this using this VQL - select key1, nest(subkey1, subkey2....) as arr from baseview; After I did this struture modification, the resultset output is very slow it takes more than 3 minutes. So, How to modify the json structure without affecting the response time? Please help.
user
29-06-2021 09:40:30 -0400
code

3 Answers

Hi, I found a similar case you can refer to: [Poor performance for jdbc and json array type join](https://community.denodo.com/answers/question/details?questionId=9064u000000CeyxAAC&title=Poor+performance+for+jdbc+and+json+array+type+join) Hope this helps!
Denodo Team
01-07-2021 06:16:35 -0400
code
Thanks for the reply. The Answer which is given here is for JSON as datasource for that join is happening in Denodo layer. But for my case I am using JDBC as Datasource and join is happening in DB layer. Still my result is slow only after using 'nest' in select query, without using nest in select query it is fast. Plesae guide me on how to tackle this issue.
user
06-07-2021 09:38:48 -0400
Hi, I would recommend you to check the execution trace to understand more about the bottleneck. Here you can find best practices for how to identify the bottlenecks. [Best Practices to Maximize Performance IV: Detecting Bottlenecks in a Query](https://community.denodo.com/kb/en/view/document/Best%20Practices%20to%20Maximize%20Performance%20IV%3A%20Detecting%20Bottlenecks%20in%20a%20Query) Also, if you need more help and have a valid support account, you can open a new case in the Support Site so the Denodo team can help you. Hope this helps!
Denodo Team
14-07-2021 05:08:19 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here