Hi,
We have MS SQL DB under our OutSystems application. In that DB we have a view that joins some tables. But it’s quite slow to use that view in our app.
We have all the data in several entities.
My task is to create some entity that would contain selected columns from the other entities.
Do you please know whether this can be done in OutSystems?
Thank you, Vilem
Hello vilem
You can achieve this with the help of structure for example you have two entities
School - I'd ,name,address, country
Class - I'd , name ,Sid(SchoolId)
You want to show only
School name and class name
- So create one structure of this
- in the server action add BL LOGIC DRAG agg. and give two source entity school and name automatically join happend on that
- output of that agg. Pass to the server action output parameter which take as (structure (school name,class name)list)
Pass the mapping parameter to the structure so you will just get what ever you want to display instead of all field
Hope this will help you.
Thanks and regards,
Akshay Deshpande
First things first. Let a DBA analyse the view on your external database. Maybe performance improvements can be made in the external database.
Regards,
Daniel
Hi, let me please correct my question. In fact we need an entity or some object that would not contain its own data but only a join of some other entities. And once application ask for its data it would get real time data from the joined entities. We don't want to duplicate the data. Is it achievable in OutSystems?
BTW the reason of this request is not the performance of the view but a clumsy process of modifying the view (we have only read only access to DB and we must often ask DBA to recompile the view)
Hello Villan ,
yes its achievable , you can create one core for both application and filter on your requirementCreate three Application -1)First application with Core modules(entity present and BL which you want to used in two application )2)Second application(end user modules) (In this used first application reference)3_Third Application (End user modules) (In this used first application reference)
This above mention application as per arch. dashboard best rules
Second thing, whatever I mentioned in first post already mention in this link go through this linkPerformance Best Practices - Queries - OutSystems