By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

php/mysql question

P: n/a
this is really a mysql question rather than php but as the two are used
togeter closely I hope someone will be able to advise me

basically I am wondering how the addition of many large text field to a
database effect it's speed (file size isn't a problem) for example i want to
make my site database driven so am using mysql but some pages have large
chunks of text in them, I think any my sql field canhold a max of 255 chars
so if i split the text into say 4 lots of 255 that would cover the remit for
the text say.

If a lot of these are fields are quite full, will it effect the speed the
database is acessed at or not?

hope that makes sense

Chris

--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ =+=+=+=+=

Chris Dean, Schools Outreach Project, Vega Science Trust
University of Sussex, Falmer, Brighton. East Sussex. BN1 9QJ. UK.

Tel.: +44 (0) 1273 87 72 93
Email: ka***@sussex.ac.uk
Web: www.vega.org.uk

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ =+=+=+=+=
Jul 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Chris Dean" <me@[remove this]christopher-dean.fsnet.co.uk> wrote in
news:bh**********@ames.central.susx.ac.uk:
this is really a mysql question rather than php but as the two are
used togeter closely I hope someone will be able to advise me

basically I am wondering how the addition of many large text field to
a database effect it's speed (file size isn't a problem) for example i
want to make my site database driven so am using mysql but some pages
have large chunks of text in them, I think any my sql field canhold a
max of 255 chars so if i split the text into say 4 lots of 255 that
would cover the remit for the text say.


Perhaps you should check the documentation on text fields, instead of only
using varchar fields.

--
Terry Austin
ta*****@hyperbooks.com
Jul 16 '05 #2

P: n/a
I was hoping someone would say that :)

I'm just playing atm and didn't check the man before posting

thanks tho

Chris

<ro*@exau.com> wrote in message news:bh*********@sparta.btinternet.com...
Max characters is 255 for 'char' / 'varchar', but if you use 'text' then you can store *ALOT* more data

"Chris Dean" <me@[remove this]christopher-dean.fsnet.co.uk> wrote in message news:bh**********@ames.central.susx.ac.uk...
this is really a mysql question rather than php but as the two are used
togeter closely I hope someone will be able to advise me

basically I am wondering how the addition of many large text field to a
database effect it's speed (file size isn't a problem) for example i want
to
make my site database driven so am using mysql but some pages have large
chunks of text in them, I think any my sql field canhold a max of 255

chars
so if i split the text into say 4 lots of 255 that would cover the remit

for
the text say.

If a lot of these are fields are quite full, will it effect the speed

the database is acessed at or not?

hope that makes sense

Chris

--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ =+=+=+=+=

Chris Dean, Schools Outreach Project, Vega Science Trust
University of Sussex, Falmer, Brighton. East Sussex. BN1 9QJ. UK.

Tel.: +44 (0) 1273 87 72 93
Email: ka***@sussex.ac.uk
Web: www.vega.org.uk

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ =+=+=+=+=


Jul 16 '05 #3

P: n/a
"Chris Dean" <me@[remove this]christopher-dean.fsnet.co.uk> wrote in message news:<bh**********@ames.central.susx.ac.uk>...
I was hoping someone would say that :)

I'm just playing atm and didn't check the man before posting

As I said, I've been using a big, complicated table to hold all info
(navigation, links, weblogs, articles, users) relating to a website. I
thought I'd pay more of a speed penalty, but so far things are still
zippy. I'm waiting for monkeyclaus.org to build a big audience to see
if this table slows down signifcantly once it is hit with a lot of
requests every second.

For now, as I say, for a small site like monkeyclaus.org, things are
still quite speedy.

#
# Table structure for table `mcContentBlocks`
#

CREATE TABLE mcContentBlocks (
cbId bigint(20) unsigned NOT NULL auto_increment,
cbHeadline varchar(255) NOT NULL default '',
cbMainContent mediumtext NOT NULL,
cbDateCreated varchar(255) NOT NULL default '',
cbWhichType varchar(255) NOT NULL default '',
cbUserName varchar(255) NOT NULL default '',
cbPassword varchar(255) NOT NULL default '',
cbIsLoggedIn char(1) NOT NULL default '',
cbDatesModified mediumtext NOT NULL,
cbLastModified varchar(255) NOT NULL default '',
cbDatesWhenViewed mediumtext NOT NULL,
cbLinksToWhatUrl text NOT NULL,
cbOOA varchar(255) NOT NULL default '',
cbSection varchar(255) NOT NULL default '',
cbKeywords mediumtext NOT NULL,
cbBelongsToWhichWebsite varchar(255) NOT NULL default '',
cbBelongsToWhichPage varchar(255) NOT NULL default '',
cbUserSecurityLevel text NOT NULL,
cbNavTextDifFromHeadline char(1) NOT NULL default '',
cbNavText varchar(255) NOT NULL default '',
cbNavOOA varchar(255) NOT NULL default '',
cbNavSection varchar(255) NOT NULL default '',
cbTemplate varchar(255) NOT NULL default '',
cbSpecialOverrideCSSClass varchar(255) NOT NULL default '',
cbExpirationDate varchar(255) NOT NULL default '',
cbModifier01 varchar(255) NOT NULL default '',
cbModifier02 varchar(255) NOT NULL default '',
cbModifier03 varchar(255) NOT NULL default '',
cbModifier04 varchar(255) NOT NULL default '',
cbModifier05 varchar(255) NOT NULL default '',
cbModifier06 varchar(255) NOT NULL default '',
cbModifier07 varchar(255) NOT NULL default '',
cbModifier08 varchar(255) NOT NULL default '',
cbModifier09 varchar(255) NOT NULL default '',
cbModifier10 varchar(255) NOT NULL default '',
cbModifier11 varchar(255) NOT NULL default '',
cbModifier12 varchar(255) NOT NULL default '',
cbModifier13 varchar(255) NOT NULL default '',
cbModifier14 varchar(255) NOT NULL default '',
cbModifier15 varchar(255) NOT NULL default '',
cbModifier16 varchar(255) NOT NULL default '',
cbModifier17 varchar(255) NOT NULL default '',
cbModifier18 varchar(255) NOT NULL default '',
cbPublicName varchar(255) NOT NULL default '',
cbEmail varchar(255) NOT NULL default '',
cbUrl varchar(255) NOT NULL default '',
cbWhenLoggedIn varchar(255) NOT NULL default '',
cbBelongsToWho varchar(255) NOT NULL default '',
cbNumTimesViewed varchar(255) NOT NULL default '',
cbNumTimesViewedLast24 varchar(255) NOT NULL default '',
cbNumTimesViewedLastWeek varchar(255) NOT NULL default '',
cbNumTimesViewedLastMonth varchar(255) NOT NULL default '',
cbIsFrontPage varchar(255) NOT NULL default '',
cbPagePassword varchar(255) NOT NULL default '',
cbUserAddress varchar(255) NOT NULL default '',
cbModifier19 text NOT NULL,
cbModifier20 text NOT NULL,
cbModifier21 text NOT NULL,
cbModifier22 text NOT NULL,
cbModifier23 text NOT NULL,
cbModifier24 text NOT NULL,
cbStyle varchar(255) NOT NULL default '',
cbAllowComments char(1) NOT NULL default '',
cbListOfAllFilesThatBelongToThisEntry varchar(255) NOT NULL default
'',
cbIsRoughDraft varchar(255) NOT NULL default '',
cbHowManyEntriesShouldWeListOnThisPage bigint(11) NOT NULL default
'0',
cbUndo mediumtext NOT NULL,
PRIMARY KEY (cbId)
) TYPE=MyISAM;
Jul 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.