6 posts tagged “mysql”
As well as the (IBM) Eclipse IDE I especially like Aptana Studio and Easy Eclipse variants.
Aptana because of its video tutorials available at aptana.tv and Easy Eclipse because of its extensive range of pre-packaged add-ons, plug-ins & extensions :
DB
SCM & Version Control
Markup & XML
1)
watch out for the additional Unicode single quote characters \u2018 ( ‘ ) & \u2019 ( ’ )
2)
use '\\' when inserting '\' and
use '\\\\' for looking for '\' in LIKE statements !
3a)
watch out for LIKE <> REGEXP !
3b)
where
first_name LIKE '%\\\\%' or
last_name LIKE '%\\\\%' or
email LIKE '%\\\\%'
3c)
where
first_name REGEXP '.*\\\\.*' or
last_name REGEXP '.*\\\\.*' or
email REGEXP '.*\\\\.*'
4)
documentation
http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like
extract
because MySQL uses C escape syntax in strings (for example, \u2018\n\u2019 to represent a newline character), you must double any \u2018\\u2019 that you use in LIKE strings. For example, to search for \u2018\n\u2019, specify it as \u2018\\n\u2019. To search for \u2018\\u2019, specify it as \u2018\\\\\u2019; this is because the backslashes are stripped once by the parser and again when the pattern match is made, leaving a single backslash to be matched against.
ANY FINALLY FINALLY !
(Exception: At the end of the pattern string, backslash can be specified as \u2018\\\u2019. At the end of the string, backslash stands for itself because there is nothing following to escape.)
First enable slow query logging, then generate a slow query and finally look at the slow query log !
Enable
http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html
Generate
select sleep(2)
then run mysqldumpslow
$ mysqldumpslow --help
Usage: mysqldumpslow [ OPTS... ] [ LOGS... ]
Parse and summarize the MySQL slow query log. Options are
--verbose verbose
--debug debug
--help write this text to standard output
-v verbose
-d debug
-s ORDER what to sort by (t, at, l, al, r, ar etc), 'at' is default
-r reverse the sort order (largest last instead of first)
-t NUM just show the top n queries
-a don't abstract all numbers to N and strings to 'S'
-n NUM abstract numbers with at least n digits within names
-g PATTERN grep: only consider stmts that include this string
-h HOSTNAME hostname of db server for *-slow.log filename (can be wildcard),
default is '*', i.e. match all
-i NAME name of server instance (if using mysql.server startup script)
-l don't subtract lock time from total time
mysqldumpslow output
# Time: 070906 12:47:20
# User@Host: root[root] @ localhost []
# Query_time: 3 Lock_time: 0 Rows_sent: 1 Rows_examined: 0
select sleep(3);
http://www.planetmysql.org/kaj/?p=85
The Quality Contribution Program goal is to improve the quality of MySQL products, with the active co-operation of the MySQL user community.
The program facilitates this by
1. visibly acknowledging the participants by attributing individual quality enhancements to them;
2. rewarding the participants with benefits in proportion to their contribution (Awards are subscriptions to MySQL Enterprise);
3. streamlining the process of contributing to MySQL Quality for the benefit of both current and future contributors
Quality Contributions fall into three categories: (i) bug reports, (ii) test cases, and (iii) code patches. We evaluate each contribution with a publicly verifiable set of rules, and the contributor accumulates the QA points for all contributions submitted during the last 12 months.
Start today @ http://dev.mysql.com/qualitycontribution.html
http://www.fsse.info/MySqlnstallation secure and benchmark