Skip to main content

Posts

Showing posts from December, 2019

Oracle APEX SYS_CONTEXT vs V Function

With APEX Version 5.0, new Application Context APEX$SESSION is introduced. User Name, Session ID and Work-space ID are populated into this context. I often read, using  APEX$SESSION Context is faster (gives better performance) than using V function, however, how fast is it? I have never measured it. It's been on my TODO list for long time and finally here is short test I did to measure the performance using both the approaches. DB Setup: I have created two views in APEX Parsing schema as follows. View demo_sys_context_v uses APEX$SESSION Context to get current APEX user name. CREATE OR REPLACE VIEW demo_sys_context_v  AS     SELECT         object_name     FROM         user_objects     WHERE         object_name = sys_context(             'APEX$SESSION'             ,'APP_USER'         ); View demo_vfunction_v uses V function to get current APEX user name. CREATE OR REPLACE VIEW demo_vfunction_v  AS     SELECT         object_n

Few tips on Gantt Charts

Oracle APEX offers several beautiful chart types which are based on Oracle JET Data Visualizations. Gantt Chart is one such beautiful and useful chart. However, when I have searched in Google for some help on Gantt Charts, there are not many blogs posts talking about it. So, I thought, I could write one with few basic tips which I have learned this year. I have used Gantt Chart to display employees calendar data and my targeted output was something like below. Pic-1 Looks simple, correct? However, it's little tricky to get there. Multiple Tasks Per Row: When I look at the output, first I thought, I will have to write a query which gives tasks data and employee data with 1 row per task. That is, if there are 10 tasks to be displayed, then there should be 10 rows in SQL query output. But, it's not correct. Instead, I should have 1 row for each task + 1 row for each employee (parent). So I need to write a query which will output data in below format. Pic-2 A