Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
9426b8ea
Commit
9426b8ea
authored
Jan 07, 2013
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 824361: Add an index on (bug_id, work_time) in the longdescs table to improve performance
r=dkl a=LpSolit
parent
292ad609
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
Schema.pm
Bugzilla/DB/Schema.pm
+1
-1
DB.pm
Bugzilla/Install/DB.pm
+12
-0
No files found.
Bugzilla/DB/Schema.pm
View file @
9426b8ea
...
...
@@ -400,7 +400,7 @@ use constant ABSTRACT_SCHEMA => {
extra_data
=>
{
TYPE
=>
'varchar(255)'
}
],
INDEXES
=>
[
longdescs_bug_id_idx
=>
[
'bug_id'
],
longdescs_bug_id_idx
=>
[
qw(bug_id work_time)
],
longdescs_who_idx
=>
[
qw(who bug_id)
],
longdescs_bug_when_idx
=>
[
'bug_when'
],
],
...
...
Bugzilla/Install/DB.pm
View file @
9426b8ea
...
...
@@ -705,6 +705,9 @@ sub update_table_definitions {
# 2012-12-29 reed@reedloden.com - Bug 785283
_add_password_salt_separator
();
# 2013-01-02 LpSolit@gmail.com - Bug 824361
_fix_longdescs_indexes
();
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
...
...
@@ -3734,6 +3737,15 @@ sub _fix_longdescs_primary_key {
}
}
sub
_fix_longdescs_indexes
{
my
$dbh
=
Bugzilla
->
dbh
;
my
$bug_id_idx
=
$dbh
->
bz_index_info
(
'longdescs'
,
'longdescs_bug_id_idx'
);
if
(
$bug_id_idx
&&
scalar
@
{
$bug_id_idx
->
{
'FIELDS'
}}
<
2
)
{
$dbh
->
bz_drop_index
(
'longdescs'
,
'longdescs_bug_id_idx'
);
$dbh
->
bz_add_index
(
'longdescs'
,
'longdescs_bug_id_idx'
,
[
qw(bug_id work_time)
]);
}
}
sub
_fix_dependencies_dupes
{
my
$dbh
=
Bugzilla
->
dbh
;
my
$blocked_idx
=
$dbh
->
bz_index_info
(
'dependencies'
,
'dependencies_blocked_idx'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment