RE: creating a new mysql automatically every day?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:jon@binaryillusions.com]
> Sent: Monday, November 18, 2002 8:26 PM
> To: php-db@lists.php.net
> Subject:  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
different
> sections of the site. i can think of two ways of doing this, although
i'm
> not sure what would be the most efficient.
> 
> option 1- i already have a table thast records each session on the
site
> (including browser type, time they entered site, referring page, etc).
on
> this, i could think of adding a field for each section of the site i
wish
> 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()
functions.
> (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
of
> automatically creating a row each day at midnight though.
> 
> my other question is i'm worried about database size. i've been
reading
> posts on this board about mySQL goin to hell with over a million
records.
> 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
for
> the
> two site admins every now and then). should i be worried?
> 
> thanks
> -jon
> 
> 
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux