Bug 107290 - DDL generator should create indexes on foreign key columns
DDL generator should create indexes on foreign key columns
Status: CLOSED WONTFIX
Product: Red Hat Web Application Framework
Classification: Retired
Component: persistence (Show other bugs)
6.0
All Linux
medium Severity high
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks: 111508
  Show dependency treegraph
 
Reported: 2003-10-16 12:04 EDT by Mike Bonnet
Modified: 2007-04-18 12:58 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

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

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
column.

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


How reproducible:
Sometimes

Steps to Reproduce:
If multiple sessions are accessing the same table, deadlocks could occur in
Oracle (and possibly also in Postgres, see
http://ccm-installer.boston.redhat.com/junit/rickshaw/36920/postgres/cms-internal/com.arsdigita.populate.cms.PopulateSuite.html).
 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 10:26:01 EDT
See also
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=107547
Comment 2 Richard Li 2003-12-04 14:28:57 EST
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 14:32:14 EDT
stale

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