Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
df591c8f
Commit
df591c8f
authored
Feb 18, 2009
by
Angie Byron
Browse files
#215080
by drifter and robertDouglass: Add index on system name and type to speed query.
parent
953c7bde
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/system/system.install
View file @
df591c8f
...
...
@@ -1179,7 +1179,7 @@ function system_schema() {
'type'
=>
array
(
'description'
=>
'The type of the item, either module, theme, or theme_engine.'
,
'type'
=>
'varchar'
,
'length'
=>
2
55
,
'length'
=>
1
2
,
'not null'
=>
TRUE
,
'default'
=>
''
,
),
...
...
@@ -1217,7 +1217,8 @@ function system_schema() {
),
'primary key'
=>
array
(
'filename'
),
'indexes'
=>
array
(
'modules'
=>
array
(
array
(
'type'
,
12
),
'status'
,
'weight'
,
'filename'
),
'modules'
=>
array
(
'type'
,
'status'
,
'weight'
,
'filename'
),
'type_name'
=>
array
(
'type'
,
'name'
),
),
);
...
...
@@ -3212,6 +3213,18 @@ function system_update_7018() {
return
$ret
;
}
/**
* Shorten the {system}.type column and add an index on type and name.
*/
function
system_update_7019
()
{
$ret
=
array
();
db_drop_index
(
$ret
,
'system'
,
'modules'
);
db_change_field
(
$ret
,
'system'
,
'type'
,
'type'
,
array
(
'type'
=>
'varchar'
,
'length'
=>
12
,
'not null'
=>
TRUE
,
'default'
=>
''
));
db_add_index
(
$ret
,
'system'
,
'modules'
,
array
(
'type'
,
'status'
,
'weight'
,
'filename'
));
db_add_index
(
$ret
,
'system'
,
'type_name'
,
array
(
'type'
,
'name'
));
return
$ret
;
}
/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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