Queries Question Queries Question
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Queries Question

Started by urmomma, December 13, 2005, 08:23:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

urmomma

I'm curious, because I have read threads and discussions here on improving the amount of queries used on Coppermine and changing a few of those to sessions. Has this been implmented in the new stable version?

Thank you.

Joachim Müller

do you expect an answer? How could we answer if you don't post what exactly you're refering to? The generic answer is: yes, queries have been changed from cpg1.3.x to cpg1.4.x

urmomma

Well yes I did ;) at the time.

Ok, for example. The index I believe in the 1.3.x version used way to many queries. Alot of which could of been changed to sessions so I was wondering with 1.4.x if that has been done as I have read some earlier threads discussing this.

donnoman

queries really don't have anything to do with sessions.  There are by far many more areas of coppermine that consume more resources than whether session information is stored in the db. (your talking mouse nuts by comparison)

Your probably confusing a thread that discussed file based session information vs sessions information stored in the database.

Coppermine does keep track of its own session information via the db that adds a couple of very minor queries. The flip side of NOT using the db is to use file based sessions which are less secure, and arguably no better performance than storing and requesting the data from a database.

The question of whether sessions should be handled by php and the webserver vs a relation database is one of security. If you can live with the security aspects of php file based sessions AND (if and only if you are using a remote sql server) you might see a performance benfiit from file based sessions.

If you are using a mysql server on localhost, I believe the difference in performance would be measured in cpu ticks, and the vulnerabilities of file based sessions would not make it worthwhile.

donnoman

If you want to get a quick boost of performance, make sure that your mysql server has "query caching" turned on, with an appropriate amount of memory dedicated to the cache.

urmomma

I see. Thanks for the explanation. Security is not an issue as of now. I'm working with IPB SDK and having the forum's scripts (some of them) run in the background to check user info. I havn't finished that though.

For me, the speed is fine. My problem is that I have a cap of 50,000 queries per hour and I have gone over that in a hour's time twice so far so decreasing the amount of queries of all my scripts is my current goal. Right now, coppermine's index runs the most queries for regular users who visit my site.

I don't quite understand why Coppermine runs 40+ queries on index on my site when my forum's index runs 6. I was just worried. Thanks for all the info.

Joachim Müller

post a link to your coppermine gallery, you probably have way too many details turned on (i.e. meta albums, cat thumbs, nested albums etc.)

urmomma

sure.

http://www.glitchseekers.com/image_gallery/index.php

the last uploaded and random albums are turned off. I put a few thumbnails on the index and understand that they each are one query, but I think I can live with that for now.

thanks for helping out.

Joachim Müller

well, your index page does look ok for me, I couldn't see much room for speed improvement (except turning of the cat thumbs).