Yii Framework Forum: How Do You Handle Statistics? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How Do You Handle Statistics? Rate Topic: -----

#1 User is offline   Bjorn 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 170
  • Joined: 15-April 13
  • Location:The Netherlands

Posted 08 May 2014 - 08:05 AM

Hi,

I'm working on a project and now I want to implement statistics.
Simplified I want this:

A user access a profile page, this action is stored into a table.
id|user_id|profile_id|datetime.

This table can grow very large and query it gonne slow things down I think. So I thought that it would be enough to parse these records and count up the visits per day.
id|user_id|profile_id|visits|date

This table will become big, but only one record per day, per profile, that's not really shocking. So queries will go faster.

Also I can empty the first table form time to time.


Is this a good approach? What is your strategy with statistics? Is there anything Yii can do for me to make things easier? I could not find a lot about statistics.

Or should I not worry about tables growing up to > 1 million records?
0

#2 User is offline   Bjorn 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 170
  • Joined: 15-April 13
  • Location:The Netherlands

Posted 09 May 2014 - 04:45 AM

No one use statistics or logs on his site? ::)
0

#3 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,382
  • Joined: 21-February 11
  • Location:Greece

Posted 09 May 2014 - 05:16 AM

View PostBjorn, on 09 May 2014 - 04:45 AM, said:

No one use statistics or logs on his site? ::)


Hi,

You can use either a Yii system cache or you can store the statistic results in a table and refresh it after of certenly time
Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#4 User is offline   Cihan Ozturk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 02-June 10
  • Location:İstanbul

Posted 09 May 2014 - 05:01 PM

http://www.yiiframew...dgsphinxsearch/

or

http://www.yiiframew...n/yii-elastica/
0

#5 User is offline   Bjorn 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 170
  • Joined: 15-April 13
  • Location:The Netherlands

Posted 09 May 2014 - 06:15 PM

Thank you both for your comments. I will look into this.
I understand that it's not a very interesting topic, statistics are not that complicated most of the time. :unsure:
0

#6 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,382
  • Joined: 21-February 11
  • Location:Greece

Posted 12 May 2014 - 03:40 AM

View PostBjorn, on 09 May 2014 - 06:15 PM, said:

Thank you both for your comments. I will look into this.
I understand that it's not a very interesting topic, statistics are not that complicated most of the time. :unsure:


It is important for any comblex query in database :)
Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users