Skip to content

Incorrect table name in Meta-Data Schema appendix [BATCH-2853] #761

Closed
@spring-projects-issues

Description

@spring-projects-issues

Luigi Quitadamo opened BATCH-2853 and commented

Index suggested in docs (https://docs.spring.io/spring-batch/docs/current/reference/html/schema-appendix.html#recommendationsForIndexingMetaDataTables) doesn't match with tables created by spring batch.

 

Default Table Name Where Clause Frequency MATCH
BATCH_JOB_INSTANCE JOB_NAME = ? and JOB_KEY = ? Every time a job is launched For SqlServer this index already exists (created by constraint)
BATCH_JOB_EXECUTION JOB_INSTANCE_ID = ? Every time a job is restarted  
BATCH_EXECUTION_CONTEXT EXECUTION_ID = ? and KEY_NAME = ? On commit interval, a.k.a. chunk This table doesn't exist
BATCH_STEP_EXECUTION VERSION = ? On commit interval, a.k.a. chunk (and at start and end of step)  
BATCH_STEP_EXECUTION STEP_NAME = ? and JOB_EXECUTION_ID = ? Before each step execution Is it correct the order for index? JOB_EXECUTION_ID is a foreign key so probably a better index should be (JOB_EXECUTION_ID, STEP_NAME)

 

 Furthermore, probably system needs index on BATCH_JOB_EXECUTION_PARAMS.JOB_EXECUTION_ID because it has a foreign key constraint.

 

 


Affects: 3.0.10, 4.2.0, 4.1.1

Referenced from: pull request #748

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions