Skip to content

Commit

Permalink
Schema: Add new indices to improve performance of `GP_Translation->fo…
Browse files Browse the repository at this point in the history
…r_translation()`.

Props @akirk for the analysis, see GlotPress#376 (comment).

See GlotPress#376.
  • Loading branch information
ocean90 authored and yoavf committed Jun 5, 2016
1 parent 73ea67a commit 9ac967a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion glotpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

define( 'GP_VERSION', '2.1.0-alpha' );
define( 'GP_DB_VERSION', '950' );
define( 'GP_DB_VERSION', '960' );
define( 'GP_ROUTING', true );
define( 'GP_PLUGIN_FILE', __FILE__ );
define( 'GP_PATH', dirname( __FILE__ ) . '/' );
Expand Down
4 changes: 3 additions & 1 deletion gp-includes/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function gp_schema_get() {
KEY user_id (user_id),
KEY translation_set_id (translation_set_id),
KEY translation_set_id_status (translation_set_id,status),
KEY original_id_translation_set_id_status (original_id,translation_set_id,status),
KEY date_added (date_added),
KEY warnings (warnings(1))
) $charset_collate;";
Expand Down Expand Up @@ -93,7 +94,8 @@ function gp_schema_get() {
date_added DATETIME DEFAULT NULL,
PRIMARY KEY (id),
KEY project_id_status (project_id,status),
KEY singular_plural_context (singular(63),plural(63),context(63))
KEY singular_plural_context (singular(63),plural(63),context(63)),
KEY project_id_status_priority_date_added (project_id,status,priority,date_added)
) $charset_collate;";

/*
Expand Down

0 comments on commit 9ac967a

Please sign in to comment.