Database fields date type why not long text ?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
applejack
Power Poster
Power Poster
Posts: 1015
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Database fields date type why not long text ?

Post by applejack »

Is there any good reason why some of the fields are set to text rather than long text such as the template_content field in the cms_templates table and the html fields in cms_htmlblobs amongst others.

I'm asking this because I'm having to create a site where the page template content is very large (don't ask, it just is) and so have changed the field type to long text. Does this make it any slower and if not then why not set to long text for this and some others such as the stylesheets and GCB ?

What's the likelihood of this getting changed back on a CMS update ?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Database fields date type why not long text ?

Post by calguy1000 »

a: if you are having to create GCB's, UDT's, or page templates that are longer than 65k characters you are certainly using them for a purpose for which they were not intended (square peg, round hole type stuff). or are doing some things completely inefficiently. I would be starting to wonder about the ongoing performance and manageability of your site.

b: more text to process is most certainly slower.

c: if you are modifying the database yourself like that then you are experienced enough to deal with your own difficulties, and are not eligible for support.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
applejack
Power Poster
Power Poster
Posts: 1015
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Database fields date type why not long text ?

Post by applejack »

Thanks Robert.

I wasn't asking for support just a general query and thoughts, though it would have been nice if you could have actually answered the question as to why these data types are set to text if there is no good reason not to set them as long text, and therefore avoid having to answers such questions in the first place as they wouldn't arise.
applejack
Power Poster
Power Poster
Posts: 1015
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Database fields date type why not long text ?

Post by applejack »

Re Point A Ok if your so sure that long text is never required please explain how you would do this.

Scenario is for an events programme which needs to be added and editable by the client without using any coding apart from the obvious one of simple text formatting.

A programme can consist of up to 4 days, with up to 20 time slots per day. A time slot needs to have 5 content blocks.

A programme can have up to 40 speakers with the ability to assign speakers to different time slots. Each speaker needs to have 5 content blocks.

All of this needs to be shown on one page giving a total of 600 content blocks.

For an example see http://www.economist.com/events-confere ... 015/agenda

I could of course make each day and each speaker a separate page but that is unacceptable for usability by the client. Also this need to be archived after the event has finished.
Post Reply

Return to “CMSMS Core”