Showing entries 25321 to 25330 of 44955
« 10 Newer Entries | 10 Older Entries »
A chessboard in MySQL

Something to keep you warm during cold winter nights, or cool during hot summer days: a chessboard in MySQL!

Note: You should see chess pieces here below. If not, you're not watching it using UTF-8, or get yourself a good browser!


CREATE TABLE `chessboard` (
`x` tinyint unsigned NOT NULL,
`a` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`b` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`c` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`d` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`e` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`f` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`g` …
[Read more]
451 CAOS Links 2009.12.23

Red Hat’s Q3. Google’s definition of open. Copyright assignment. And more.

Follow 451 CAOS Links live @caostheory on Twitter and Identi.ca
“Tracking the open source news wires, so you don’t have to.”

For the latest on Oracle’s acquisition of MySQL via Sun, see Everything you always wanted to know about MySQL but were afraid to ask

# Red Hat reported third quarter net income of $16.4m on revenue up 18% at $194m

# Jonathan Rosenberg, Google’s senior vice president, product management, presented Google’s …

[Read more]
Know your data – and your numeric types.

Numeric types in MySQL have two varieties: - “precise” types such as INTEGER and DECIMAL; - the IEEE-standard floating point types FLOAT and DOUBLE. As a rule of thumb, the first group are for exact, “counted” quantities. The INTEGER types represent whole numbers, and DECIMAL represents “fixed point” decimal, with a preset number of places after the decimal point. Various widths of INTEGER are available in MySQL, from 8-bit TINYINT to 64-bit BIGINT. Calculations with integer types are fast, as they usually correspond to hardware register sizes. DECIMAL is commonly used for quantities like decimal currency where the number of digits of precision is known and fixed. For example, exactly counting pennies in two decimal digits. Computation with DECIMAL is slower than other types, but this is unlikely to impact most applications. In the other category are FLOAT and DOUBLE, which are the 32 and 64-bit IEEE standard types, which are usually …

[Read more]
Monitoring the right MySQL slow queries

When looking at a set of SQL statements in isolation with tools such as the slow query log, processlist and tcpdump/mk-query-digest it is easy to identify queries that are slow.

It is more difficult however to identify the frequency of the query, and whether the slow query is actually acceptable in your overall system design.

I very simple technique to help you is to comment your queries. For example:

SELECT /* 10m cache */ ...;

When I’m working for a client, this process enables me to realize the purpose of the query more quickly and to help prioritize which queries I need to improve first. This does not mean I simply ignore these less frequent queries, however my choices for reviewing and indexing queries on given tables is adjusted generally for OLTP queries first, and batch second.

As with all practices it is important to implement across your full code base.

MONyog MySQL Monitor 3.65 Has Been Released

Changes (as compared to 3.62) include:

Features:
* You can now specify a comma-separated list of users to be ignored/excluded by notify and/or kill actions for long-running queries in ’query sniffer’ interface.
* Added a ‘diagnostic info’ icon to servers in ‘list of servers’ page. Clicking this will generate a report in plain text with the most basic information about the server.
* Added an option to stop/start data collection for a server in ‘list of servers’ page (without opening the detailed pages for this server).
* Enabling/disabling data collection from and/or alerting about all servers can be done from tools .. preferences .. maintenance.
* Enabling/disabling data collection from and/or alerting about specific servers can be done by calling the MONyog URL with parameters. This can be scripted and scheduled using any standard method available with the …

[Read more]
Using character sets with MySQL Connector/Python

Here is two small examples showing the wonderful world of character sets and unicode using MySQL Connector/Python (using 0.1.2-devel and up) in both Python v2.x and v3.1.

The following table will be used with default character set latin7, i.e. ISO-8859-13. Just setting it to UTF-8 would be bit boring!


CREATE TABLE `latin7test` (
`c1` varchar(60) DEFAULT NULL
) DEFAULT CHARSET=latin7

Things to note for the code listed below are:

  • We're using charset='latin7' as connection option. This is important!
  • We set use_unicode=True so the results coming from MySQL are encoded to unicode. For testing, we disable this later.
[Read more]
MySQL Connector/Python 0.1.2-devel available!

MySQL Connector/Python 0.1.2-devel is a quick follow-up release for 0.1.1 fixing a few problems around character sets and unicode.

You can download Connector/Python from LaunchPad.

Release notes for MySQL Connector/Python 0.1.2-devel


o Fixing unicode usage for both Python 2.4+ and 3.1
* Setting 'use_unicode' at connection time is now
working.
* conversion.py: removing regular expression for
quoting backslashes.
* Adding test case for bug lp:499410

Py3k specific:
* Strings from MySQL are decoded to the given character
when use_unicode is false
* The statement is encoded just before sending it to the
MySQL server. Internally, all is done in …
[Read more]
On the other hand, Google doesn't seem to know how package management works

Even the most casual of acquaintances knows that I really, really hate software that doesn't understand how we do things out here in the Open Source world. We have tools, really amazing ones, called ... "Package Managers" which allow us to "Install" software and describe the "Relationships" between elements. Apparently they can't seem to figure out how to deal with software dependencies and instead they opt for the "copy into tree and fork" method:

Google is forking existing FOSS code bits for Chromium like a rabbit makes babies: frequently, and usually, without much thought. Rather than leverage the existing APIs from upstream projects like icu, libjingle, and sqlite (just to name a few), they simply fork a point in time of that code and hack their API to shreds for chromium to use. This is akin to much of the Java methodology, which I can sum up as "I'd like to use this …

[Read more]
MySQL Cluster running on Windows – new Webinar

MySQL Cluster Running on Windows

Replay now available from http://www.mysql.com/news-and-events/on-demand-webinars/display-od-445.html

I’ll be presenting a (free) webinar on installing, configuring and running MySQL Cluster on Windows – starting at 10:00 PT on 7th January – that’s 18:00 UK time or 19:00 for most of Europe. To attend, just register ahead of time at mysql.com

In this presentation we will explore the benefits of leveraging MySQL Cluster on Windows. We will also cover step by step, how to get started with installing, configuring, and running MySQL Cluster on Windows. Finally, a review of MySQL …

[Read more]
CAOS Theory’s most popular posts of 2009

Here are CAOS Theory’s top 20 posts of 2009, in terms of page views:

October – Our take on the potential ramifications of the suspension of OSI’s corporate status.

January – An overview of the open core and embedded open source strategies that we expected to dominate in 2009.

[Read more]
Showing entries 25321 to 25330 of 44955
« 10 Newer Entries | 10 Older Entries »