php/mysql question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Dean

    php/mysql question

    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

    #2
    Re: php/mysql question

    "Chris Dean" <me@[remove this]christopher-dean.fsnet.co.u k> 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@hyperbo oks.com

    Comment

    • Chris Dean

      #3
      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.btinte rnet.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.u k> 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]


      Comment

      • lawrence

        #4
        Re: php/mysql question

        "Chris Dean" <me@[remove this]christopher-dean.fsnet.co.u k> wrote in message news:<bhg9hb$kt 2$1@ames.centra l.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 `mcContentBlock s`
        #

        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 '',
        cbDatesWhenView ed mediumtext NOT NULL,
        cbLinksToWhatUr l text NOT NULL,
        cbOOA varchar(255) NOT NULL default '',
        cbSection varchar(255) NOT NULL default '',
        cbKeywords mediumtext NOT NULL,
        cbBelongsToWhic hWebsite varchar(255) NOT NULL default '',
        cbBelongsToWhic hPage varchar(255) NOT NULL default '',
        cbUserSecurityL evel text NOT NULL,
        cbNavTextDifFro mHeadline 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 '',
        cbSpecialOverri deCSSClass varchar(255) NOT NULL default '',
        cbExpirationDat e 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 '',
        cbNumTimesViewe d varchar(255) NOT NULL default '',
        cbNumTimesViewe dLast24 varchar(255) NOT NULL default '',
        cbNumTimesViewe dLastWeek varchar(255) NOT NULL default '',
        cbNumTimesViewe dLastMonth 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 '',
        cbListOfAllFile sThatBelongToTh isEntry varchar(255) NOT NULL default
        '',
        cbIsRoughDraft varchar(255) NOT NULL default '',
        cbHowManyEntrie sShouldWeListOn ThisPage bigint(11) NOT NULL default
        '0',
        cbUndo mediumtext NOT NULL,
        PRIMARY KEY (cbId)
        ) TYPE=MyISAM;

        Comment

        Working...