Tuesday, April 24, 2018

Prune Data in Union Nodes in SAP HANA


      Pruning data in union view nodes help optimize the query execution. You create a pruning configuration table, which specifies the filter conditions to limit the result set, and prune data using this table.

      For pruning data in union view nodes, create a pruning configuration table that the tool must refer to, and define this table in the view properties


  • Create configuration table as follows in HANA data base



CREATE COLUMN TABLE "HANADEV"."PRUNE_UNION" (
     "SCHEMA" NVARCHAR(100),
              "CALC_SCENARIO" NVARCHAR(100), 
"INPUT" NVARCHAR(10),
   "COLUMN" NVARCHAR(20),
"OPTION" NVARCHAR(10),
"LOW_VALUE" NVARCHAR(20),
     "HIGH_VALUE" NVARCHAR(20)
  • create calculation view  with union node as follows
  • once created it, set created configuration table to hana calculation view. set Pruning Configuration table  as "HANADEV"."PRUNE_UNION"

















  • now run Plan Viz 
here you can see,  only,  the relevant  record has been fetched from relevent Node 

















3 comments:

  1. great work mirana.
    helps us lot to increased our query performances.

    ReplyDelete
    Replies
    1. Mirana, I know its a very old blog. I was hoping if you could add a screenshot for the Pruning config table. I am what entries should be made.

      Delete

SAP HANA Cloud Integration SAP : Part -01

What Is SAP HANA Cloud Integration? CPI-DS is a cloud-based data integration tool for batch & scheduled data integration between on-pr...