Index on nid in the files table.

msameer - November 22, 2006 - 09:22
Project:Drupal
Version:6.x-dev
Component:file system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Hi,

Seems that the image module is executing queries like:

SELECT filename, filepath FROM files WHERE nid=561;

But the files table doesn't have a key on nid. I guess that adding it will improve the selects against large tables ?

#1

killes@www.drop.org - November 22, 2006 - 10:00
Version:4.7.4» 5.x-dev

it is probably a good guess. :p
I think a patch for this makes sense, but I am moving it to HEAD.

#2

msameer - November 22, 2006 - 10:15

Patch against 5.0 beta1

AttachmentSize
drupal_files_nid_index.patch 647 bytes

#3

spatz4000 - April 2, 2007 - 15:01
Version:5.x-dev» 6.x-dev

#4

merlinofchaos - July 10, 2007 - 17:11
Status:active» needs review

This probably would get more attention if labeled as a patch.

#5

msameer - July 14, 2007 - 12:27
Status:needs review» needs work

I can't mark it as needs review while I know it's not.

#6

drewish - September 5, 2007 - 20:10
Status:needs work» won't fix

there's no longer a files.nid column.

 
 

Drupal is a registered trademark of Dries Buytaert.