Redundant database query?

Szii szii at sziisoft.com
Thu Oct 28 15:00:15 EDT 2004


I noticed this, but upon closer examination, it's doing a SQL prepare
first.  I don't know if you're seeing the same thing.

Since it's only being executed once, I don't know why the extra overhead
of a SQL prepare but..../shrug.

-Mike/Szii

----- Original Message ----- 
From: "Patrick Gibson" <cyrus_info at patrickg.com>
To: <info-cyrus at lists.andrew.cmu.edu>
Sent: Thursday, October 28, 2004 11:28 AM
Subject: Redundant database query?


> I've got cyrus-imapd 2.2.8 setup to authenticate via a MySQL database. 
> I've enabled logging on the database while I'm setting things up, and 
> I've noticed that when I login, Cyrus runs the same query twice:
> 
>     47 Connect     cyrus at localhost on RETRIX_TRANSITION
>     47 Query       START TRANSACTION
>     47 Query       select PASSWORD from USER_ACCOUNTS where 
> USERNAME='patrick'
>     47 Query       select PASSWORD from USER_ACCOUNTS where 
> USERNAME='patrick'
>     47 Query       COMMIT
> 
> Any idea as to why this would be happening?
> 
> I've looked through the sql.c module in the sasl source, but it doesn't 
> look like the problems originates there (though I could be wrong). Has 
> anyone else experienced this?
> 
> This system will eventually have a lot of users, and I want to optimize 
> things as much as possible.
> 
> Thanks,
> 
> Patrick
> 
> ---
>   patrick gibson
>   http://patrickgibson.com/
> 
> ---
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
> 
> 
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list