Closed (fixed)
Project:
DB Tuner
Version:
6.x-1.0-alpha2
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 May 2010 at 18:57 UTC
Updated:
28 Jun 2010 at 16:10 UTC
I have several CCK fields that are causing a notice which suggests I modify my view.
The errors look like this.
"CCK Type X is used in a view filter in the content_field_program table, but database row is of type longtext. This is generally a bad idea. Please change your view(s) to not filter on text."
This advice is unclear to me. What exactly should I do in this situation? Modify my view to not use the CCK field? or is it asking for something else?
Comments
Comment #1
mikeytown2 commentedWhat to do in this situation depends on what your currently doing with that view and cck field. What is the cck field used for, and is this view slow for you? Did it correctly identify that this is a problematic query?
Comment #2
cruelgamer commentedI have around 6 of these fields each with that notice attached to them when i use db tuner. The cck fields are snippets of text that i use to build various url's and paths which are not drupal nodes. It's hard to say if the view is slow or not, but if it can be optimized i would certainly like to know how.
Comment #3
mikeytown2 commentedwhats the longest string you will ever have stored in this cck type?
Comment #4
mikeytown2 commentedGo to your cck field's edit screen
Global settings
Maximum length
Set this to less then 255.
If less then 255 then mysql can index that field.
Comment #5
cruelgamer commentedI am fairly confident none of the fields contain data over 255 characters. I made the changes to the CCK fields maximum length in global settings and the notices are gone now. Probably too early to tell if the view is any faster, but every little bit helps. Thanks for the quick responses, and thanks for the great module!
Comment #6
mikeytown2 commentedI'll add in some help text to the output so other users will have a general idea on what to do.
Comment #7
mikeytown2 commentedcommitted
Comment #8
keva commentedthanks - that extra bit of text helped.