That is good advice. I wasn't aware of indexes/keys slowing down inserts.
Whats the best way to copy a table over to another table though?


-----Original Message-----
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 5:36 PM
To: 'Jonathan Narong'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] creating a new mysql automatically every day?

Not sure what the best answer is, but if you are going to have a table
that's mostly going to be inserted into, and rarely read, then don't
create any indexes or keys on it. When it comes time to search the
table, copy it to another table, create indexes, and search away.
Indexes slow down inserts.

---John Holmes...

> -----Original Message-----
> From: Jonathan Narong [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 8:26 PM
> Subject: [PHP-DB] creating a new mysql automatically every day?
> i'm currently building a traffic analysis application for a website.
it is
> my first time working on such a project, so i'm not even sure if this
> would
> be the best way to do it all, but here it goes.
> what i would like to do is count the number of hits that go to
> sections of the site. i can think of two ways of doing this, although
> not sure what would be the most efficient.
> option 1- i already have a table thast records each session on the
> (including browser type, time they entered site, referring page, etc).
> this, i could think of adding a field for each section of the site i
> to
> log, and simply implement a counter each time they visit a certain
> section.
> then when i wanted to analyze it i could use the mySQL sum()
> (because i'm really only interested in how many total visits to each
> section, not who went where exactly).
> option 2- having another table with a new row being created daily, and
> fields with a counter for each section. then i would have the problem
> automatically creating a row each day at midnight though.
> my other question is i'm worried about database size. i've been
> posts on this board about mySQL goin to hell with over a million
> this table is definitely going to eventually grow pretty large, but it
> wond
> be accessed all that much (as it would just be for traffic analysis
> the
> two site admins every now and then). should i be worried?
> thanks
> -jon
> --
> PHP Database Mailing List (
> To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to