[Deploying Sakai] [Building Sakai] mysql redundant statements (SQL_SELECT_LIMIT)

Lance Speelmon lance at rsmart.com
Fri Apr 20 07:25:55 PDT 2012


Sounds like it could be this [1]:

 1342   					if (this.hasLimitClause) {
 1343   						rowLimit = this.maxRows;
 1344   					} else {
 1345   						if (this.maxRows <= 0) {
 1346   							executeSimpleNonQuery(locallyScopedConn,
 1347   									"SET OPTION SQL_SELECT_LIMIT=DEFAULT");

[1] http://www.docjar.com/html/api/com/mysql/jdbc/PreparedStatement.java.html

Maybe setting maxRows to a sufficiently high number might prevent it?


On Apr 20, 2012, at 5:19 AM, Stephen Marquard wrote:

> Hi all,
> 
> I wonder if anyone has come across unusual behaviour with mysql and
> this statement:
> 
> SET OPTION SQL_SELECT_LIMIT=DEFAULT
> 
> If we enable query logging on a test server, there are thousands of
> these, mostly redundant in about a 10:1 ratio to real queries. For
> example this will get issued over and over again for one connection
> (e.g. 1675 below):
> 
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1678 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1677 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
>                 1675 Query     SET OPTION SQL_SELECT_LIMIT=DEFAULT
> 
> The source of this is the mysql connector-j and I've seen the same
> behaviour on the latest version (5.1.19) and an older version (5.0.8) so
> it doesn't seem to be a recent change. It could be a consequence of some
> other change in Sakai or Hibernate though.
> 
> We think this is a contributing factor to some performance issues, so
> are keen to resolve it.
> 
> Regards
> Stephen
> 
> 
> Stephen Marquard, Acting Director 
> Centre for Educational Technology, University of Cape Town
> http://www.cet.uct.ac.za
> Email/IM/XMPP: stephen.marquard at uct.ac.za 
> Phone: +27-21-650-5037 Cell: +27-83-500-5290 
> 
> 
> 
> 
> 
> 
> ###
> 
> UNIVERSITY OF CAPE TOWN 
> 
> This e-mail is subject to the UCT ICT policies and e-mail disclaimer
> published on our website at
> http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from
> +27 21 650 9111. This e-mail is intended only for the person(s) to whom
> it is addressed. If the e-mail has reached you in error, please notify
> the author. If you are not the intended recipient of the e-mail you may
> not use, disclose, copy, redirect or print the content. If this e-mail
> is not related to the business of UCT it is sent by the sender in the
> sender's individual capacity.
> 
> ###
> 
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



More information about the production mailing list