RE: date-IFNULL-sum bug?

2012-10-09 Thread hsv
2012/10/08 14:52 -0700, Rick James Do not use + for DATE arithmetic! Use, for example + INTERVAL 1 YEAR No, those operations are well defined. Amongst the timestamp-functions there is constant reference to numeric context, and character context--and well there is, because there are no

Query Cache Crashing

2012-10-09 Thread Ben Clewett
Hi MySql, Since upgrading to 5.5.27 (5.5.27-ndb-7.2.8-cluster-gpl-log to be exact) I have experienced problems with the query cache. I am wondering if I am the only one? Twice I have had a core-dump (show at end of mail) on two separate servers running this version. Now I had a complete

Re: Slow queries / inserts InnoDB

2012-10-09 Thread Andrés Tello
You are forcing mysql to do full table scans with the substr... Use explain to see that you aren't using any index. Avoid the use of substr in the where clause, by splitting your data, index that field and do you query over that field. That is why your query is so slow. the slow insert, is

RE: Query Cache Crashing

2012-10-09 Thread Rick James
As for the crash, I don't know. Instead, I recommend either shrinking the size (if you use a big QC) or turning it off. This would make the issue go away. ANY modification to a particular table leads to ALL entries in the Query cache being purged. For that reason, we (Yahoo) almost never use

RE: Slow queries / inserts InnoDB

2012-10-09 Thread Rick James
When creating the temp table, add another column, isn2, that is SUBSTR(ISN, 2). Add INDEX(isn2, type) Change the query to... isn2 = ' isn ' ORDER BY type LIMIT 1 It that does not work, please provide clearer details, including SHOW CREATE TABLE SHOW TABLE STATUS EXPLAIN SELECT (with

Monitoring Sessions

2012-10-09 Thread Anupam Karmarkar
Hi All, How to monitor individual session number of rows selected or updated by sessions, number of bytes sent and reviewed by session in a given time period, sessions connects runs command and then disconnects, SHOW GLOBAL STATUS is not helping me in this case as i want low level session

Re: Slow queries / inserts InnoDB

2012-10-09 Thread Cheng Xianming
Tello is right ! Moreno, and I sugest that: if you want query by SUBSTR(ISN,2) ,you should create a field named like isnInfo, and save SUBSTR(ISN,2) to this filed when you insert . don't forget create a index on this field . 于 12-10-9 下午10:04, Andrés Tello