DDC-1413: Automatically create index for discriminator column #1772

Closed
opened 2026-01-22 13:25:32 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 11, 2011).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user ajbrown:

It would be nice if the command line orm schema-tool would suggest an index on the discriminator column for single inheritance tables. Since that column would almost always be in the query, I can't think of a case when you wouldn't want it to be in an index

Originally created by @doctrinebot on GitHub (Oct 11, 2011). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user ajbrown: It would be nice if the command line orm schema-tool would suggest an index on the discriminator column for single inheritance tables. Since that column would almost always be in the query, I can't think of a case when you wouldn't want it to be in an index
admin added the ImprovementWon't Fix labels 2026-01-22 13:25:32 +01:00
admin closed this issue 2026-01-22 13:25:34 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 12, 2013):

Comment created by holtkamp:

This topic suggests it is a bad practice though:
https://forum.hibernate.org/viewtopic.php?f=9&t=961578

In case of a big STI hierarchy, this might become usefull, additional testing required. However, as soons as a STI hierarchy becomes big, Class Table Inheritance might be more appropriate...

@doctrinebot commented on GitHub (Jun 12, 2013): Comment created by holtkamp: This topic suggests it is a bad practice though: https://forum.hibernate.org/viewtopic.php?f=9&t=961578 In case of a big STI hierarchy, this might become usefull, additional testing required. However, as soons as a STI hierarchy becomes big, Class Table Inheritance might be more appropriate...
Author
Owner

@malukenho commented on GitHub (Jan 5, 2017):

@Ocramius can be closed as invalid or won't fix

@malukenho commented on GitHub (Jan 5, 2017): @Ocramius can be closed as `invalid` or `won't fix`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1772