Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-759

use dynamic parameters and PreparedStatement for frequently executed SQL patterns

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.1.6 (3.5.2 GA Suite Release)
    • Fix Version/s: Not Planned
    • Component/s: Native SQL
    • Labels:
      None

      Description

      An example would be this SQL issued for navigating a recursive parent/child hierarchy (captured from the Mondrian unit tests).

      > select "employee"."employee_id" as "c0",
      > "employee"."full_name" as "c1"
      > from "employee" as "employee" where "employee"."supervisor_id" = 187
      > group by "employee"."employee_id", "employee"."full_name" order by
      > "employee"."employee_id" ASC

      The same statement is executed repeatedly, with only the supervisor_id (187) varying. For some DBMS implementations, this can run a lot faster if a prepared statement is used. (For some, such as LucidDB, it doesn't even matter whether the statement is kept around inside of Mondrian; the DBMS can cache the plan even without a prepared statement staying around across executions.)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned User
            Reporter:
            John Sichi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: