Home arrow Forum

Remository Forum

 


<< Start < Previous 1 2 Next > End >>
cowboy

Karma: 0  
OPTIMIZE the backend! - 2005/11/07 23:41 Are you planning to optimize the backend?

Right now, the backend executes 3 SQL's per listing. So, for 20 items per list, it's 60 SQLs! This is a resource issue and would raise some flags from some hosting providers.

It should just be 1 SQL for any number of item in listings. Just like how the others work.

I suggest you use JOIN on your SQLs.

-Cowboy.

Post edited by: cowboy, at: 2005/11/07 18:43
  | | Sorry, you do not currently have permission to write here.
cowboy

Karma: 0  
Re:OPTIMIZE the backend! - 2005/11/08 03:47 It's worst on browsing the files on the backend.
139 SQLs excuted just for browsing 20-item file list.

I really wonder why you're not using JOIN here to reduce it to 1 SQL only.
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 101  
Re:OPTIMIZE the backend! - 2005/11/08 04:02 I don't know where you are getting your figures from, or why you think a JOIN would be relevant. Remository does a maximum of 3 database accesses per page in the backend file listing. Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.
cowboy

Karma: 0  
Re:OPTIMIZE the backend! - 2005/11/08 05:39 Here is the first 10 lines from that 139 sql when browsing the files.

SELECT * FROM aliro_downloads_files ORDER BY filetitle LIMIT 0,208
SELECT count(id) FROM aliro_downloads_files9
SELECT * from aliro_downloads_containers WHERE parentid=0 ORDER BY name10
SELECT * FROM aliro_downloads_containers WHERE parentid = 73 ORDER BY name11
SELECT * FROM aliro_downloads_containers WHERE parentid = 72 ORDER BY name12
SELECT * FROM aliro_downloads_containers WHERE parentid = 81 ORDER BY name13
SELECT * FROM aliro_downloads_containers WHERE parentid = 29 ORDER BY name14
SELECT * FROM aliro_downloads_containers WHERE parentid = 13 ORDER BY name15
SELECT * FROM aliro_downloads_containers WHERE parentid = 14 ORDER BY name16
SELECT * FROM aliro_downloads_containers WHERE parentid = 16 ORDER BY name17
...... and more...


Put a debug on your administrator/index2.php...
and you see what im talking about.

Post edited by: cowboy, at: 2005/11/08 00:41
  | | Sorry, you do not currently have permission to write here.
cowboy

Karma: 0  
Re:OPTIMIZE the backend! - 2005/11/08 05:50 and by the way... i'm using 3.22.
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 101  
Re:OPTIMIZE the backend! - 2005/11/08 16:29 I beg your pardon, you are correct, and I take back my earlier statement. The admin side has been treated as having the lowest priority for efficiency, since there are fewer admins and they generally do less. So the order of optimisation is user side browsing, user side download, admin side.

But it has perhaps got a bit out of hand It is acquiring information about containers that is the problem. Given the additional information provided in Remository 3.40 it would be difficult to devise a suitable join. However, I've implemented a buffering mechanism (which also exists in the Remository SEF software). So now all the container information is read from the database in one go and stored. Should be an acceptable memory overhead in pretty much all situations. The number of DB accesses is now down to less than the Mambo/Joomla ones.

The SQL you cite is actually constructing the select list of all possible containers. As it lists them complete with their full nested names, I'm not at all sure that a join would even be possible.

Thanks for bringing my attention to the issue.

Post edited by: admin, at: 2005/11/08 11:45
Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.
<< Start < Previous 1 2 Next > End >>

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Recommended SEF

SEF Advance

Who is Online

Remository welcomes guests and visitors

We have 8 guest online