Yii Framework Forum: Too Much Relations Could Make The Server Slow? - Yii Framework Forum

Jump to content

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

Too Much Relations Could Make The Server Slow? Rate Topic: -----

#1 User is offline   clonevn 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 111
  • Joined: 25-March 13

Posted 19 May 2013 - 11:32 AM

I know that the relation in the model will help the model wrap as much as possible tables and column depends on the conditions. If currently I have 20 tables and more than 50 relations. I feel that it is slower than before. Could it happen? :lol:
0

#2 User is offline   sefburhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 136
  • Joined: 08-February 12
  • Location:islamabad

Posted 20 May 2013 - 02:45 AM

View Postclonevn, on 19 May 2013 - 11:32 AM, said:

I know that the relation in the model will help the model wrap as much as possible tables and column depends on the conditions. If currently I have 20 tables and more than 50 relations. I feel that it is slower than before. Could it happen? :lol:


see this http://www.yiiframew...ics.performance
0

#3 User is offline   jneto 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 19-November 12
  • Location:Portugal

Posted 20 May 2013 - 10:23 PM

use
http://www.yiiframew...-debug-toolbar/

to see sql e memory usage
0

#4 User is offline   KonApaz 

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

Posted 21 May 2013 - 05:57 AM

Hi clonevn

Except the advices of @jneto and @fburhan89 I question you ...
1) Is it nessesary this task to completed on one request?
2) This task must be done on every request ?
3) May be have to thing a cron job task every certainly time or using Yii cashing system

Post more specific details :)
Yii is the best php framework in the world!
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#5 User is offline   le_top 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 299
  • Joined: 08-June 10
  • Location:France

Posted 21 May 2013 - 12:14 PM

Hi

Personally I do not think that relations are making things slower unless the requests themselves are not efficient.

I noticed recently that setting up behaviors is slow (see http://www.yiiframew...post__p__204540 for a workaround) and to find what is slow for you, profiling may help you to the anwser.
0

#6 User is offline   clonevn 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 111
  • Joined: 25-March 13

Posted 22 May 2013 - 11:35 AM

Thank you all for your ideas. My table is big because of too many exception and one models could do 3 tasks differently. That's why it is big, could not change anything in the database. This time is about optimizing the system. I will try your suggestion and get back later :).
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