Commit e5bfca226e50b27f68293eb8c5ced37bf7741abc
1 parent
87280094
KNP-33
"Top Download Dashlet takes a long time to load" Fixed. Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7850 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
3 changed files
with
7 additions
and
2 deletions
lib/database/schema.inc.php
| ... | ... | @@ -534,6 +534,8 @@ class KTSchemaUtil |
| 534 | 534 | $this->defineIndex('document_content_version','filename','','(255)'); |
| 535 | 535 | $this->defineIndex('document_content_version','size'); |
| 536 | 536 | |
| 537 | + $this->defineIndex('document_transactions',array('datetime','transaction_namespace')); | |
| 538 | + | |
| 537 | 539 | $this->defineIndex('field_behaviour_options',array('behaviour_id','field_id')); |
| 538 | 540 | |
| 539 | 541 | $this->defineIndex('field_behaviours','name'); |
| ... | ... | @@ -548,6 +550,7 @@ class KTSchemaUtil |
| 548 | 550 | |
| 549 | 551 | $this->defineIndex('folder_transactions','folder_id'); |
| 550 | 552 | $this->defineIndex('folder_transactions','session_id'); |
| 553 | + | |
| 551 | 554 | $this->defineIndex('folders', array('parent_id','name')); |
| 552 | 555 | |
| 553 | 556 | $this->defineIndex('groups_lookup','name', 'UNIQUE'); | ... | ... |
sql/mysql/install/structure.sql
| ... | ... | @@ -485,7 +485,8 @@ CREATE TABLE `document_transactions` ( |
| 485 | 485 | `admin_mode` tinyint(1) NOT NULL default '0', |
| 486 | 486 | PRIMARY KEY (`id`), |
| 487 | 487 | KEY `session_id` (`session_id`), |
| 488 | - KEY `document_id` (`document_id`) | |
| 488 | + KEY `document_id` (`document_id`), | |
| 489 | + KEY (`datetime`,`transaction_namespace`) | |
| 489 | 490 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 490 | 491 | |
| 491 | 492 | -- | ... | ... |
sql/mysql/upgrade/3.5.2/document_transactions.sql
| ... | ... | @@ -2,4 +2,5 @@ alter table document_transactions change version version varchar(50); |
| 2 | 2 | alter table document_transactions change ip ip varchar(15); |
| 3 | 3 | alter table document_transactions change filename filename mediumtext; |
| 4 | 4 | alter table document_transactions change comment comment mediumtext; |
| 5 | -alter table document_transactions change transaction_namespace transaction_namespace varchar(255); | |
| 6 | 5 | \ No newline at end of file |
| 6 | +alter table document_transactions change transaction_namespace transaction_namespace varchar(255); | |
| 7 | +alter table document_transactions add index (`datetime`,`transaction_namespace`); | |
| 7 | 8 | \ No newline at end of file | ... | ... |