[
https://issues.apache.org/jira/browse/OOZIE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340291#comment-16340291
]
Attila Sasvari commented on OOZIE-1717:
---------------------------------------
[~todd.farmer] thanks for the recommendation.
Oozie uses OpenJPA 2.4.2 to talk with databases (Oracle, PostgreSQL, etc. are
also supported). OpenJPA 2.4.2 supports only [JPA
2.0|http://openjpa.apache.org/]. Do you know how we can define a covering
composite index with OpenJPA, I could not find it in the documentation.
I tried the following things in org.apache.oozie.CoordinatorJobBean
{code:java}
@Index(name = "index1", columnNames = {"status, created_time"})
@Index(name = "index2", columnNames = {"status", "created_time"}){code}
but none of them resulted in a composite index. The [Table
annotation|[https://github.com/apache/oozie/blob/acdf291aef48fd0f9a5b0e3270afacb7ee4a1543/core/src/main/java/org/apache/oozie/CoordinatorJobBean.java#L158|https://github.com/apache/oozie/blob/acdf291aef48fd0f9a5b0e3270afacb7ee4a1543/core/src/main/java/org/apache/oozie/CoordinatorJobBean.java#L158]]]
in CoordinatorJobBean did not accept indices either.
I can see in
[OozieDBCLI|https://github.com/apache/oozie/blob/acdf291aef48fd0f9a5b0e3270afacb7ee4a1543/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java#L977]
that a clustered index is created "manually". We can follow this pattern if
really needed.
It would be good to have a list for more interesting (composite) indexes.
> Index user_name column
> ----------------------
>
> Key: OOZIE-1717
> URL: https://issues.apache.org/jira/browse/OOZIE-1717
> Project: Oozie
> Issue Type: Bug
> Reporter: Purshotam Shah
> Assignee: Attila Sasvari
> Priority: Minor
> Attachments: OOZIE-1717-00.patch
>
>
> User_name is one of the frequently used filter. Adding index should avoid
> full db scan.
> Index need to be done for BUNDLE_JOBS,COORD_JOBS and WF_JOBS.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)