Connecting Tech Pros Worldwide Forums | Help | Site Map

php/mysql question

Chris Dean
Guest
 
Posts: n/a
#1: Jul 17 '05
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: kaur1@sussex.ac.uk
Web: www.vega.org.uk

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


Terry Austin
Guest
 
Posts: n/a
#2: Jul 17 '05

re: php/mysql question


"Chris Dean" <me@[remove this]christopher-dean.fsnet.co.uk> wrote in
news:bh0geg$t3t$1@ames.central.susx.ac.uk:
[color=blue]
> 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.[/color]

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

--
Terry Austin
taustin@hyperbooks.com
Chris Dean
Guest
 
Posts: n/a
#3: Jul 17 '05

re: php/mysql question


I was hoping someone would say that :)

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

thanks tho

Chris

<rob@exau.com> wrote in message news:bh0i5r$sf$1@sparta.btinternet.com...[color=blue]
> Max characters is 255 for 'char' / 'varchar', but if you use 'text' then[/color]
you[color=blue]
> can store *ALOT* more data
>
> "Chris Dean" <me@[remove this]christopher-dean.fsnet.co.uk> wrote in[/color]
message[color=blue]
> news:bh0geg$t3t$1@ames.central.susx.ac.uk...[color=green]
> > 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[/color][/color]
want[color=blue]
> to[color=green]
> > 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[/color]
> chars[color=green]
> > so if i split the text into say 4 lots of 255 that would cover the remit[/color]
> for[color=green]
> > the text say.
> >
> > If a lot of these are fields are quite full, will it effect the speed[/color][/color]
the[color=blue][color=green]
> > 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: kaur1@sussex.ac.uk
> > Web: www.vega.org.uk
> >
> > =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ =+=+=+=+=
> >
> >[/color]
>
>[/color]


lawrence
Guest
 
Posts: n/a
#4: Jul 17 '05

re: php/mysql question


"Chris Dean" <me@[remove this]christopher-dean.fsnet.co.uk> wrote in message news:<bhg9hb$kt2$1@ames.central.susx.ac.uk>...[color=blue]
> I was hoping someone would say that :)
>
> I'm just playing atm and didn't check the man before posting[/color]


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;
Closed Thread