Since we provide the means to filter on severity the data column needs to be an index to prevent a whole table read.

Files: 
CommentFileSizeAuthor
#18 d7-backport-1827136-18.patch629 bytesposulliv
PASSED: [[SimpleTest]]: [MySQL] 39,658 pass(es).
[ View ]
#7 severity_dbtng-1827136-7.patch702 bytespatrickd
PASSED: [[SimpleTest]]: [MySQL] 46,628 pass(es).
[ View ]
#3 dblog-AddIndex-1827136-3.patch701 bytesamatzies
PASSED: [[SimpleTest]]: [MySQL] 46,494 pass(es).
[ View ]
#1 dblog-AddIndex-1827136-1.patch376 bytesamatzies
FAILED: [[SimpleTest]]: [MySQL] 46,398 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Comments

StatusFileSize
new376 bytes
FAILED: [[SimpleTest]]: [MySQL] 46,398 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

This patch adds the index.

Status:Active» Needs work

While the patch adds the index for new installations you didn't supply a hook_update_N to modify the existing tables.

StatusFileSize
new701 bytes
PASSED: [[SimpleTest]]: [MySQL] 46,494 pass(es).
[ View ]

Thanks for the feedback. I added the hook_update_N now.

Status:Needs work» Needs review

You need to set the status to "needs review" when adding a patch for the testbot to see it.

Status:Needs review» Reviewed & tested by the community

works for me (there's a missing dot at the end of the comment though)

Status:Reviewed & tested by the community» Needs work

Then let us be nit-picky.

Status:Needs work» Needs review
StatusFileSize
new702 bytes
PASSED: [[SimpleTest]]: [MySQL] 46,628 pass(es).
[ View ]

same as #3, but with dot

Status:Needs review» Needs work

The last submitted patch, severity_dbtng-1827136-7.patch, failed testing.

Issue tags:+Novice

I think the testbot had a hiccup in its get-up-and-go.

Status:Needs work» Needs review
Issue tags:-Novice

#7: severity_dbtng-1827136-7.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, severity_dbtng-1827136-7.patch, failed testing.

Status:Needs work» Needs review

#7 now it's green, weird bot

Status:Needs review» Reviewed & tested by the community

Yea, the testbot had an issue and the was requeued by the testbot admin. Unfortunately that doesn't reset the Status.

Status:Reviewed & tested by the community» Needs review

Please post a before/after EXPLAIN on the query this index affects.

Since this needs backport to Drupal 7, I think we can actually skip adding the update to Drupal 8 (as long as it does actually get backported).

Without:

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE w index NULL PRIMARY 4 NULL 11420 Using where
1 SIMPLE u eq_ref PRIMARY PRIMARY 4 d7port.w.uid 1

With:

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE w ref severity severity 1 const 124 Using where; Using filesort
1 SIMPLE u eq_ref PRIMARY PRIMARY 4 d7port.w.uid 1

Status:Needs review» Reviewed & tested by the community

Version:8.x-dev» 7.x-dev
Status:Reviewed & tested by the community» Patch (to be ported)
Issue tags:+needs backport to D7

Thanks!

I removed the update function from the patch and committed/pushed this one to 8.x. Moving to 7.x for backport. Tagging with 'revisit before release' so this doesn't get lost if it's never committed to 7.x for any reason.

Status:Patch (to be ported)» Needs review
StatusFileSize
new629 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,658 pass(es).
[ View ]

Patch to backport to D7.

Status:Needs review» Reviewed & tested by the community

Patch looks good.

Status:Reviewed & tested by the community» Fixed

Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/b5d7ec6

(Note that I fixed a couple small documentation issues on commit: The function was in the wrong docgroup, since this is not part of the Drupal 6-to-7 upgrade, and the grammar on the function PHPDoc needed a little work.)

Automatically closed -- issue fixed for 2 weeks with no activity.