Bug 107290 - DDL generator should create indexes on foreign key columns
Summary: DDL generator should create indexes on foreign key columns
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: persistence (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
Target Milestone: ---
Assignee: ccm-bugs-list
QA Contact: Jon Orris
Depends On:
Blocks: 111508
TreeView+ depends on / blocked
Reported: 2003-10-16 16:04 UTC by Mike Bonnet
Modified: 2007-04-18 16:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-03 18:32:14 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Mike Bonnet 2003-10-16 16:04:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701

Description of problem:
Missing indexes on foreign key columns are a known cause of deadlocks (see
http://www.ixora.com.au/q+a/0010/26231626.htm).  The DDL generator should be
automatically creating an index every time it adds a foreign key constraint to a

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
If multiple sessions are accessing the same table, deadlocks could occur in
Oracle (and possibly also in Postgres, see
 It's not 100% clear that the lack of indexes are causing these problems, but it
seems likely.

Actual Results:  Deadlocks

Expected Results:  No deadlocks

Additional info:

Marking this as a high priority because these deadlocks cause the system to
break in unexpected ways, and they are difficult to debug if you haven't seen
them before.  Many thanks to David Lutterkort and Aram Kananov for their
assistance in diagnosing this problem.

Comment 1 Vadim Nasardinov 2003-10-20 14:26:01 UTC
See also

Comment 2 Richard Li 2003-12-04 19:28:57 UTC
Apparently, it's not 100% of the time you want to create the FK
indices, so we'll want an opt-out/opt-in solution, depending on
whether ultimately the default is opt-out or opt-in.

Comment 3 Vadim Nasardinov 2005-08-03 18:32:14 UTC

Note You need to log in before you can comment on or make changes to this bug.