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
eb2fb414
Commit
eb2fb414
authored
Mar 23, 2005
by
Dries Buytaert
Browse files
- Patch by Matt and chx: improved performance of taxonomy queries. When many
terms are matched, the query would become very slow.
parent
a7fa9552
Changes
3
Hide whitespace changes
Inline
Side-by-side
database/database.mysql
View file @
eb2fb414
...
...
@@ -653,7 +653,8 @@ CREATE TABLE term_node (
nid int(10) unsigned NOT NULL default '0',
tid int(10) unsigned NOT NULL default '0',
KEY nid (nid),
KEY tid (tid)
KEY tid (tid),
PRIMARY KEY (tid,nid)
) TYPE=MyISAM;
--
...
...
database/database.pgsql
View file @
eb2fb414
...
...
@@ -649,7 +649,8 @@ CREATE INDEX term_hierarchy_parent_idx ON term_hierarchy(parent);
CREATE TABLE term_node (
nid integer NOT NULL default '0',
tid integer NOT NULL default '0'
tid integer NOT NULL default '0',
PRIMARY KEY (tid,nid)
);
CREATE INDEX term_node_nid_idx ON term_node(nid);
CREATE INDEX term_node_tid_idx ON term_node(tid);
...
...
database/updates.inc
View file @
eb2fb414
...
...
@@ -103,7 +103,8 @@
"2005-02-11"
=>
"update_124"
,
"2005-02-23"
=>
"update_125"
,
"2005-03-03"
=>
"update_126"
,
"2005-03-18"
=>
"update_127"
"2005-03-18"
=>
"update_127"
,
"2005-03-21"
=>
"update_128"
);
function
update_32
()
{
...
...
@@ -2336,4 +2337,17 @@ function update_sql($sql) {
}
}
function
update_128
()
{
$ret
=
array
();
if
(
$GLOBALS
[
'db_type'
]
==
'mysql'
)
{
$ret
[]
=
update_sql
(
'ALTER TABLE {term_node} ADD PRIMARY KEY (tid,nid)'
);
}
elseif
(
$GLOBALS
[
'db_type'
]
==
'pgsql'
)
{
$ret
[]
=
update_sql
(
'ALTER TABLE {term_node} ADD PRIMARY KEY (tid,nid)'
);
}
return
$ret
;
}
?>
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