Regarding The CCK module.

If I add too many fields to a content type, could it load the server excessively when pages for that content type are requested?
Is there a recommended amount of fields?

Thank you,

Cristian

Comments

fjuqp’s picture

Anyone, please.

modul’s picture

Very unlikely that a "decent" amount of fields would cause severe load on your server. Depending on your situation, collecting these fields would mean a good deal of MySQL "joins", but I would say that anything which is "manageable" from a human point of view (say, maybe, 15-30 fields) is absolutely no problem for your server. Furthermore, it also depends if you're talking about queries for authenticated users, or, which causes hardly any load at all, queries for anonymous users, which are grabbed from cache, decreasing the server load considerably.

It is not uncommon for a single Drupal page to require about 100 MySQL queries or more. Adding a couple of fields (and queries) won't really matter.

But that's of course a very generaly reply :-)

fjuqp’s picture

Thanks for answering, Modul.
I am going to be the only registered user. So I'm glad to hear that queries from anonymous users don't cause a severe server load.
Also, could the cache help a bit on this?

Thank you,

Cristian

vm’s picture

Anon users are always cached.

Registered users aren't otherwise there would be a delay in them being able to see new content added to areas of the site.

There are modules in the downlaods area to help with some caching, ie: the block cache module to help lower querries caused by blocks and such.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

heine’s picture

The page cache for anonymous users is only used when caching is enabled (normal or agressive) under Administer » Site configuration » Performance (admin/settings/performance).

Drupal and contributed modules (CCK) do cache a lot of information (besides fully rendered pages) that takes a long time to generate, but can be safely used over and over again.

--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

vm’s picture

Thank you for the clarification Heine.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

modul’s picture

If you are the only registered user, and if you enable cache (the normal type of caching, in my case) there will be no problem whatsoever. I had a stress test running on my site, with me being the only registered user and some 1,000 concurrent simulated users (well, not exàctly all at the same moment, but within very short timespans). These simulated users generated about 300,000 hits over a period of a couple of hours. Result: no delays at all (say 0.5 seconds response time or so). Drupal's cache really works - although the setup and the memory of your server also play a considerable role, of course.

fjuqp’s picture

Thank you very much. All the answers were so clear to me.

I love this community.

Take Care,

Cristian