Repository: incubator-griffin
Updated Branches:
  refs/heads/master 4e0f25d2c -> c06bbeda4


add eclipselink and hibernate,mysql and postgresql document

Author: ahutsunshine <ahutsunsh...@gmail.com>
Author: He Wang <wanghe...@qq.com>
Author: dodobel <1254288...@qq.com>

Closes #249 from ahutsunshine/master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin/commit/c06bbeda
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/c06bbeda
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/c06bbeda

Branch: refs/heads/master
Commit: c06bbeda4bf3e936d0bee6ff6fdfe658e9ad6363
Parents: 4e0f25d
Author: ahutsunshine <ahutsunsh...@gmail.com>
Authored: Sun Apr 8 18:09:57 2018 +0800
Committer: Lionel Liu <bhlx3l...@163.com>
Committed: Sun Apr 8 18:09:57 2018 +0800

----------------------------------------------------------------------
 .../service/hibernate_eclipselink_switch.md     | 182 +++++++++++++++++
 griffin-doc/service/mysql_postgresql_switch.md  |  56 +++++
 .../core/config/EclipseLinkJpaConfig.java       |   1 -
 .../src/main/resources/init_quartz_postgres.sql | 203 +++++++++++++++++++
 4 files changed, 441 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/c06bbeda/griffin-doc/service/hibernate_eclipselink_switch.md
----------------------------------------------------------------------
diff --git a/griffin-doc/service/hibernate_eclipselink_switch.md 
b/griffin-doc/service/hibernate_eclipselink_switch.md
new file mode 100644
index 0000000..3c1ad06
--- /dev/null
+++ b/griffin-doc/service/hibernate_eclipselink_switch.md
@@ -0,0 +1,182 @@
+# Hibernate and eclipselink switch
+## Overview
+In this document,we list two main part.
+
+- [Migration from Hibernate to EclipseLink](#0.0)
+- [Migration from EclipseLink to Hibernate](#0.1)
+
+<h2 id = "0.0"></h2>
+
+## Migration from Hibernate to EclipseLink
+By default, Spring Data uses Hibernate as the default JPA implementation 
provider.However, Hibernate is certainly not the only JPA implementation 
available to us.In this document, we’ll go through steps necessary to set up 
EclipseLink as the implementation provider for Spring Data JPA.The migration 
will not need to convert any Hibernate annotations to EclipseLink annotations 
in application code. 
+
+## Migration main steps
+- [exclude hibernate dependencies](#1.1)
+- [add EclipseLink dependency](#1.2)
+- [configure EclipseLink static weaving](#1.3)
+- [spring code configuration](#1.4)
+- [configure properties](#1.5)
+
+<h2 id = "1.1"></h2>
+
+### Exclude hibernate dependencies
+Since we want to use EclipseLink instead as the JPA provider, we don't need it 
anymore.Therefore we can remove it from our project by excluding its 
dependencies:
+
+    <dependency>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-data-jpa</artifactId>
+        <exclusions>
+            <exclusion>
+                <groupId>org.hibernate</groupId>
+                <artifactId>*</artifactId>
+            </exclusion>
+        </exclusions>
+    </dependency>
+
+<h2 id = "1.2"></h2>
+
+### Add EclipseLink dependency
+To use it in our Spring Boot application, we just need to add the 
org.eclipse.persistence.jpa dependency in the pom.xml of our project.
+
+    <properties>
+        <eclipselink.version>2.6.0</eclipselink.version>
+    </properties>
+    <dependency>
+        <groupId>org.eclipse.persistence</groupId>
+        <artifactId>org.eclipse.persistence.jpa</artifactId>
+        <version>${eclipselink.version}</version>
+    </dependency>
+    
+<h2 id = "1.3"></h2> 
+
+### Configure EclipseLink static weaving
+EclipseLink requires the domain types to be instrumented to implement 
lazy-loading. This can be achieved either through static weaving at compile 
time or dynamically at class loading time (load-time weaving). In Griffin,we 
use static weaving in pom.xml.
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.ethlo.persistence.tools</groupId>
+                <artifactId>eclipselink-maven-plugin</artifactId>
+                <version>2.7.0</version>
+                <executions>
+                    <execution>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>weave</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.eclipse.persistence</groupId>
+                        <artifactId>org.eclipse.persistence.jpa</artifactId>
+                        <version>${eclipselink.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build> 
+    
+<h2 id = "1.4"></h2>
+
+### Spring configuration
+**JpaBaseConfiguration is an abstract class which defines beans for JPA** in 
Spring Boot. Spring  provides a configuration implementation for Hibernate out 
of the box called HibernateJpaAutoConfiguration. However, for EclipseLink, we 
have to create a custom configuration.To customize it, we have to implement 
some methods like createJpaVendorAdapter() or getVendorProperties().
+First, we need to implement the createJpaVendorAdapter() method which 
specifies the JPA implementation to use.
+Also, we have to define some vendor-specific properties which will be used by 
EclipseLink.We can add these via the getVendorProperties() method.
+**Add following code as a class to org.apache.griffin.core.config package in 
Griffin project.**
+   
+
+        @Configuration
+        @ComponentScan("org.apache.griffin.core")
+        public class EclipseLinkJpaConfig extends JpaBaseConfiguration {
+            protected EclipseLinkJpaConfig(DataSource ds, JpaProperties 
properties,
+                                           
ObjectProvider<JtaTransactionManager> jtm,
+                                           
ObjectProvider<TransactionManagerCustomizers> tmc) {
+                super(ds, properties, jtm, tmc);
+            }
+        
+            @Override
+            protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
+                return new EclipseLinkJpaVendorAdapter();
+            }
+        
+            @Override
+            protected Map<String, Object> getVendorProperties() {
+                Map<String, Object> map = new HashMap<>();
+                map.put(PersistenceUnitProperties.WEAVING, "false");
+                map.put(PersistenceUnitProperties.DDL_GENERATION, 
"create-or-extend-tables");
+                return map;
+            }
+        }
+
+<h2 id = "1.5"></h2>
+
+#### Configure properties
+You need to configure properties according to the database you use in Griffin.
+Please see [Mysql and postgresql 
switch](https://github.com/apache/incubator-griffin/blob/master/griffin-doc/service/mysql_postgresql_switch.md)
 to configure.
+
+<h2 id = "0.1"></h2>
+
+## Migration from EclipseLink to Hibernate
+Here we'll go through steps necessary to migrate applications from using 
EclipseLink JPA to using Hibernate JPA.The migration will not need to convert 
any EclipseLink annotations to Hibernate annotations in application code. 
+
+## Migration main steps
+- [add hibernate dependency](#2.1)
+- [remove EclipseLink](#2.2)
+- [configure properties](#2.3)
+
+<h2 id = "2.1"></h2>
+
+### Add hibernate dependency
+By default, Spring Data uses Hibernate as the default JPA implementation 
provider.So we just add **spring-boot-starter-data-jpa** dependency.If you have 
already added it, skip this step.
+
+    <dependency>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-data-jpa</artifactId>
+    </dependency>
+
+<h2 id = "2.2"></h2>
+
+### Remove EclipseLink dependency
+**If you don't want to remove EclipseLink,you can skip this step.**
+
+- remove EclipseLink dependency 
+
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>org.eclipse.persistence.jpa</artifactId>
+            <version>${eclipselink.version}</version>
+        </dependency>
+
+- remove EclipseLink static weaving
+
+        <plugin>
+            <groupId>com.ethlo.persistence.tools</groupId>
+            <artifactId>eclipselink-maven-plugin</artifactId>
+            <version>2.7.0</version>
+            <executions>
+                <execution>
+                    <phase>process-classes</phase>
+                    <goals>
+                        <goal>weave</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <dependencies>
+                <dependency>
+                    <groupId>org.eclipse.persistence</groupId>
+                    <artifactId>org.eclipse.persistence.jpa</artifactId>
+                    <version>${eclipselink.version}</version>
+                </dependency>
+            </dependencies>
+        </plugin>
+
+- remove EclipseLinkJpaConfig class
+
+  remove EclipseLinkJpaConfig class in org.apache.griffin.core.config package. 
 
+
+<h2 id = "2.3"></h2>
+
+#### Configure properties
+You need to configure properties according to the database you use in Griffin.
+Please see [Mysql and postgresql 
switch](https://github.com/apache/incubator-griffin/blob/master/griffin-doc/service/mysql_postgresql_switch.md)
 to configure.

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/c06bbeda/griffin-doc/service/mysql_postgresql_switch.md
----------------------------------------------------------------------
diff --git a/griffin-doc/service/mysql_postgresql_switch.md 
b/griffin-doc/service/mysql_postgresql_switch.md
new file mode 100644
index 0000000..d3925a1
--- /dev/null
+++ b/griffin-doc/service/mysql_postgresql_switch.md
@@ -0,0 +1,56 @@
+# Mysql and postgresql switch
+
+## Overview
+By default, Griffin uses EclipseLink as the default JPA implementation. 
+## Use postgresql database 
+
+### Add postgresql dependency
+
+    <dependency>
+        <groupId>org.postgresql</groupId>
+        <artifactId>postgresql</artifactId>
+    </dependency>
+
+### Configure properties
+- configure application.properties
+
+        spring.datasource.url = 
jdbc:postgresql://localhost:5432/quartz?autoReconnect=true&useSSL=false
+        spring.datasource.username = griffin
+        spring.datasource.password = 123456
+        spring.jpa.generate-ddl=true
+        spring.datasource.driver-class-name = org.postgresql.Driver
+        spring.jpa.show-sql = true
+  If you use hibernate as your jpa implentation, you need also to add 
following configuration.
+     
+        spring.jpa.hibernate.ddl-auto = update
+        spring.jpa.hibernate.naming-strategy = 
org.hibernate.cfg.ImprovedNamingStrategy
+       
+- configure quartz.properties
+
+      
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
+      
+## Use mysql database 
+### Add mysql dependency
+
+    <dependency>
+        <groupId>mysql</groupId>
+        <artifactId>mysql-connector-java</artifactId>
+    </dependency>
+### Configure properties
+
+- configure application.properties
+
+        spring.datasource.url = 
jdbc:mysql://localhost:3306/quartz?autoReconnect=true&useSSL=false
+        spring.datasource.username = griffin
+        spring.datasource.password = 123456
+        spring.jpa.generate-ddl=true
+        spring.datasource.driver-class-name = com.mysql.jdbc.Driver
+        spring.jpa.show-sql = true
+   If you use hibernate as your jpa implentation, you need also to add 
following configuration.
+     
+        spring.jpa.hibernate.ddl-auto = update
+        spring.jpa.hibernate.naming-strategy = 
org.hibernate.cfg.ImprovedNamingStrategy
+- configure quartz.properties
+
+      
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/c06bbeda/service/src/main/java/org/apache/griffin/core/config/EclipseLinkJpaConfig.java
----------------------------------------------------------------------
diff --git 
a/service/src/main/java/org/apache/griffin/core/config/EclipseLinkJpaConfig.java
 
b/service/src/main/java/org/apache/griffin/core/config/EclipseLinkJpaConfig.java
index a7cbcb0..29ff5cc 100644
--- 
a/service/src/main/java/org/apache/griffin/core/config/EclipseLinkJpaConfig.java
+++ 
b/service/src/main/java/org/apache/griffin/core/config/EclipseLinkJpaConfig.java
@@ -16,7 +16,6 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 */
-
 package org.apache.griffin.core.config;
 
 import org.eclipse.persistence.config.PersistenceUnitProperties;

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/c06bbeda/service/src/main/resources/init_quartz_postgres.sql
----------------------------------------------------------------------
diff --git a/service/src/main/resources/init_quartz_postgres.sql 
b/service/src/main/resources/init_quartz_postgres.sql
new file mode 100644
index 0000000..fb6e813
--- /dev/null
+++ b/service/src/main/resources/init_quartz_postgres.sql
@@ -0,0 +1,203 @@
+
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+-- In your Quartz properties file, you'll need to set
+-- org.quartz.jobStore.driverDelegateClass = 
org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
+
+drop table qrtz_fired_triggers;
+DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE QRTZ_SCHEDULER_STATE;
+DROP TABLE QRTZ_LOCKS;
+drop table qrtz_simple_triggers;
+drop table qrtz_cron_triggers;
+drop table qrtz_simprop_triggers;
+DROP TABLE QRTZ_BLOB_TRIGGERS;
+drop table qrtz_triggers;
+drop table qrtz_job_details;
+drop table qrtz_calendars;
+
+CREATE TABLE qrtz_job_details
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    JOB_NAME  VARCHAR(200) NOT NULL,
+    JOB_GROUP VARCHAR(200) NOT NULL,
+    DESCRIPTION VARCHAR(250) NULL,
+    JOB_CLASS_NAME   VARCHAR(250) NOT NULL,
+    IS_DURABLE BOOL NOT NULL,
+    IS_NONCONCURRENT BOOL NOT NULL,
+    IS_UPDATE_DATA BOOL NOT NULL,
+    REQUESTS_RECOVERY BOOL NOT NULL,
+    JOB_DATA BYTEA NULL,
+    PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_triggers
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    TRIGGER_NAME VARCHAR(200) NOT NULL,
+    TRIGGER_GROUP VARCHAR(200) NOT NULL,
+    JOB_NAME  VARCHAR(200) NOT NULL,
+    JOB_GROUP VARCHAR(200) NOT NULL,
+    DESCRIPTION VARCHAR(250) NULL,
+    NEXT_FIRE_TIME BIGINT NULL,
+    PREV_FIRE_TIME BIGINT NULL,
+    PRIORITY INTEGER NULL,
+    TRIGGER_STATE VARCHAR(16) NOT NULL,
+    TRIGGER_TYPE VARCHAR(8) NOT NULL,
+    START_TIME BIGINT NOT NULL,
+    END_TIME BIGINT NULL,
+    CALENDAR_NAME VARCHAR(200) NULL,
+    MISFIRE_INSTR SMALLINT NULL,
+    JOB_DATA BYTEA NULL,
+    PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+    FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+       REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_simple_triggers
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    TRIGGER_NAME VARCHAR(200) NOT NULL,
+    TRIGGER_GROUP VARCHAR(200) NOT NULL,
+    REPEAT_COUNT BIGINT NOT NULL,
+    REPEAT_INTERVAL BIGINT NOT NULL,
+    TIMES_TRIGGERED BIGINT NOT NULL,
+    PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+    FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+       REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_cron_triggers
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    TRIGGER_NAME VARCHAR(200) NOT NULL,
+    TRIGGER_GROUP VARCHAR(200) NOT NULL,
+    CRON_EXPRESSION VARCHAR(120) NOT NULL,
+    TIME_ZONE_ID VARCHAR(80),
+    PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+    FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+       REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_simprop_triggers
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    TRIGGER_NAME VARCHAR(200) NOT NULL,
+    TRIGGER_GROUP VARCHAR(200) NOT NULL,
+    STR_PROP_1 VARCHAR(512) NULL,
+    STR_PROP_2 VARCHAR(512) NULL,
+    STR_PROP_3 VARCHAR(512) NULL,
+    INT_PROP_1 INT NULL,
+    INT_PROP_2 INT NULL,
+    LONG_PROP_1 BIGINT NULL,
+    LONG_PROP_2 BIGINT NULL,
+    DEC_PROP_1 NUMERIC(13,4) NULL,
+    DEC_PROP_2 NUMERIC(13,4) NULL,
+    BOOL_PROP_1 BOOL NULL,
+    BOOL_PROP_2 BOOL NULL,
+    PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+    FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+    REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_blob_triggers
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    TRIGGER_NAME VARCHAR(200) NOT NULL,
+    TRIGGER_GROUP VARCHAR(200) NOT NULL,
+    BLOB_DATA BYTEA NULL,
+    PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+    FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+        REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_calendars
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    CALENDAR_NAME  VARCHAR(200) NOT NULL,
+    CALENDAR BYTEA NOT NULL,
+    PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+
+CREATE TABLE qrtz_paused_trigger_grps
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    TRIGGER_GROUP  VARCHAR(200) NOT NULL,
+    PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_fired_triggers
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    ENTRY_ID VARCHAR(95) NOT NULL,
+    TRIGGER_NAME VARCHAR(200) NOT NULL,
+    TRIGGER_GROUP VARCHAR(200) NOT NULL,
+    INSTANCE_NAME VARCHAR(200) NOT NULL,
+    FIRED_TIME BIGINT NOT NULL,
+    SCHED_TIME BIGINT NOT NULL,
+    PRIORITY INTEGER NOT NULL,
+    STATE VARCHAR(16) NOT NULL,
+    JOB_NAME VARCHAR(200) NULL,
+    JOB_GROUP VARCHAR(200) NULL,
+    IS_NONCONCURRENT BOOL NULL,
+    REQUESTS_RECOVERY BOOL NULL,
+    PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE qrtz_scheduler_state
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    INSTANCE_NAME VARCHAR(200) NOT NULL,
+    LAST_CHECKIN_TIME BIGINT NOT NULL,
+    CHECKIN_INTERVAL BIGINT NOT NULL,
+    PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE qrtz_locks
+  (
+    SCHED_NAME VARCHAR(120) NOT NULL,
+    LOCK_NAME  VARCHAR(40) NOT NULL,
+    PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+create index idx_qrtz_j_req_recovery on 
qrtz_job_details(SCHED_NAME,REQUESTS_RECOVERY);
+create index idx_qrtz_j_grp on qrtz_job_details(SCHED_NAME,JOB_GROUP);
+
+create index idx_qrtz_t_j on qrtz_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP);
+create index idx_qrtz_t_jg on qrtz_triggers(SCHED_NAME,JOB_GROUP);
+create index idx_qrtz_t_c on qrtz_triggers(SCHED_NAME,CALENDAR_NAME);
+create index idx_qrtz_t_g on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP);
+create index idx_qrtz_t_state on qrtz_triggers(SCHED_NAME,TRIGGER_STATE);
+create index idx_qrtz_t_n_state on 
qrtz_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
+create index idx_qrtz_t_n_g_state on 
qrtz_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
+create index idx_qrtz_t_next_fire_time on 
qrtz_triggers(SCHED_NAME,NEXT_FIRE_TIME);
+create index idx_qrtz_t_nft_st on 
qrtz_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
+create index idx_qrtz_t_nft_misfire on 
qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
+create index idx_qrtz_t_nft_st_misfire on 
qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
+create index idx_qrtz_t_nft_st_misfire_grp on 
qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
+
+create index idx_qrtz_ft_trig_inst_name on 
qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME);
+create index idx_qrtz_ft_inst_job_req_rcvry on 
qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
+create index idx_qrtz_ft_j_g on 
qrtz_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP);
+create index idx_qrtz_ft_jg on qrtz_fired_triggers(SCHED_NAME,JOB_GROUP);
+create index idx_qrtz_ft_t_g on 
qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
+create index idx_qrtz_ft_tg on qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP);
+
+
+commit;
\ No newline at end of file

Reply via email to