'SQL' Tag

  • Speaking on Percona Live, London: "Programmatic Queries: things you can code with SQL"

    October 10, 2011

    I'll be speaking at the Percona Live event, held in London, October 24, 25, 2011. My session is called Programmatic Queries: things you can code with SQL. It's a short 30 minute talk, in which I present underlying knowledge of the programmatic nature of SQL queries within MySQL, and how to take advantage of such [...]

  • Three wishes for a new year

    September 27, 2011

    It's another new year by Jewish calendar. And what do I wish for in the following year? World peace Good health to all Have some way to turn SHOW commands into SELECT statements, server side. I'm fervently trying to hack around this. Stored routines, export/import from file, text manipulation, I don't care! I want to [...]

  • MySQL eval()

    September 6, 2011

    I've just implemented an eval() call for MySQL. It is implemented with SQL, using a stored procedure. So this is not some plugin: you can use it from within your normal database server. Just what is an eval() call? In some programming languages it would mean: get some text, and execute it as though it [...]

  • You know you've been doing too much SQL when...

    September 1, 2011

    ...you're traveling on family holiday, and each time you wish to suggest you should check up on the tourist information center, you repeatedly come up with: "Let's ask at the INFORMATION_SCHEMA and see what we can get". Also, doing so while wearing an OpenSQL Camp T-shirt doesn't help.

  • MySQL Global status difference using single query

    August 12, 2011

    Have just read MySQL Global status difference using MySQL procedures / functions, by Andres Karlsson. Have commented, but realized I did not provide with a direct answer. In the comment, I suggested checking out a solution based on views, found in common_schema. But the solution in common_schema is split into two views, due to the [...]

  • Finding CURRENT_USER for any user

    August 9, 2011

    A MySQL account is a user/host combination. A MySQL connection is done by a user connecting from some host. However, the user/host from which the connection is made are not the same as the user/host as specified in the account. For example, the account may be created thus: CREATE USER 'temp'@'10.0.0.%' IDENTIFIED BY '123456'; The [...]

  • Announcing common_schema: common views & routines for MySQL

    July 13, 2011

    Today I have released common_schema, a utility schema for MySQL which includes many views and functions, and is aimed to be installed on any MySQL server. What does it do? There are views answering for all sorts of useful information: stuff related to schema analysis, data dimensions, monitoring, processes & transactions, security, internals... There are [...]

  • Pop quiz answered: "what would be the results of the following queries?"

    May 12, 2011

    The quiz presented poses with an uncommon, though valid SQL syntax: one is allowed to use quoted name aliases. Thus, it is valid to write: SELECT Name AS 'n', Continent AS 'c' FROM countries But what does the above mean? Let's see the results of our three questions:

  • Pop quiz: what would be the results of the following queries?

    May 12, 2011

    Here's a quiz for you. The real query I witnessed was very complicated. I've simplified it, but kept a confusing alias. Can you answer the following three questions? Are they even valid? Given the following countries table data:

  • Generating Google line charts with SQL, part II

    March 3, 2011

    This post continues Generating Google line charts with SQL, part I, in pursue of generating time series based image charts. We ended last post with the following chart: http://chart.apis.google.com/chart?cht=lc&chs=400x200&chtt=SQL%20chart&chxt=x,y&chxr=1,-4716.6,5340.0&chd=s:dddddddddeeeeeefffffffffeeeedddcccbbaaZZZYYYXXXXXXXXXYYYZZabbcdeefghhijkkllmmmmmmmmllkkjihgfedcbZYXWVUTSRRQQPPPPQQQRSTUVWXZacdfgijlmnpqrssttuuuttssrqonmkigfdbZXVTSQONMLKJIIIIIIJKLMOPRTVXZbegilnprtvwyz01111110zyxvtrpnkifcaXUSPNLJHFECBBAAABBCEFHJLNQTWZcfilortwy1346789999876420yvspmjfcYVSOL which has a nice curve, and a proper y-legend, but incorrect x-legend and no ticks nor grids. To date, Google Image Charts do not support time-series [...]

 
Powered by Wordpress and MySQL. Theme by openark.org