Page 1 of 1

Database fields date type why not long text ?

Posted: Fri Jan 30, 2015 1:49 pm
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 ?

Re: Database fields date type why not long text ?

Posted: Fri Jan 30, 2015 3:07 pm
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.

Re: Database fields date type why not long text ?

Posted: Fri Jan 30, 2015 3:23 pm
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.

Re: Database fields date type why not long text ?

Posted: Sat Jan 31, 2015 6:49 pm
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.