Table node_field_matrix_data should have indexes for perfomance

greenmother - June 9, 2009 - 08:45
Project:Matrix Field
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

for only query that used in module it should be:
$schema['node_field_matrix_data']['primary key'] = array('vid', 'field_name');
but i recommend add one more for nid:
$schema['node_field_matrix_data']['indexes'] = array('nid' => array('nid'));

#1

aaron1234nz - June 9, 2009 - 09:09
Version:6.x-1.4» 6.x-2.x-dev
Status:active» fixed

Thanks for the suggestion. I've added the indexes in the latest 2.x dev version.

#2

greenmother - June 9, 2009 - 14:54

oh, sorry, primary index should be

<?php
$schema
['node_field_matrix_data']['primary key'] = array('vid', 'field_name', 'row', 'col');
?>

#3

greenmother - June 10, 2009 - 04:20
Status:fixed» active

#4

aaron1234nz - July 6, 2009 - 09:14
Status:active» fixed

I've only implemented simple indexes on nid and vid as database data integrity checking is not needed here.

#5

System Message - July 20, 2009 - 09:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.