Skip navigation links
Showing entries 1 to 7

Tags Filter: sql (reset)

Articles
Add to Favourites +0 Vote Up -0Vote Down
Over the last few weeks I've been looking at several customers' slow query logs, and I found in many of them an odd type of query. These are "SELECT" statements that contain an "IN" clause that includes dozens, sometimes hundreds of values. These statements often end in the slow query log. I'm not sure if these queries are this way by design or if they are generated by a specific database development tool. I did some tests in one of my own databases, one with only around 10K rows in its largest table. The database corresponds to the Amarok media player. For example, I queried for songs by B. B. King (spelled "BB King", "B.B. King", etc. or with other artists: "B. B. King & Eric Clapton"). The first query used a "JOIN" and an "IN" clause with all the spellings in my db; the second used the same "JOIN" and "WHERE ... name LIKE  []
Articles
Add to Favourites +2 Vote Up -0Vote Down
Tags:
(edit) mysql, sql
Some trick : how to generate/use a table of (not necessarily sequential) numbers from a mysql server.
Books
Add to Favourites +1 Vote Up -0Vote Down
A book review by Baron Schwartz.
Articles
Add to Favourites +8 Vote Up -0Vote Down
Tags:
(edit) mysql, graphs, sql
Generate ascii pie charts using SQL only, based on any generic query.
Articles
Add to Favourites +5 Vote Up -0Vote Down
SQL is not meant to generate graphics, for sure; but Shlomi sees some cases where generating non-tabular output can be desirable. He explains the basics of working SQL graphics: it is actually possible to do whatever you like.
Articles
Add to Favourites +4 Vote Up -0Vote Down
We all love graphs. We all love SQL hacks. We all know the SQL hack which displays a character-based graph (example follows for those unfamiliar). But we all love horizontal graphs, not vertical ones. We are used to the X axis being horizontal, Y being vertical. Not vice versa. In this post I’ll present a SQL hack which rotates a vertical graph to horizontal. In fact, the technique shown will rotate any ‘textual image’; but graphs are a nice example.
Articles
Add to Favourites +2 Vote Up -0Vote Down
The Open SQL Camp 2009, European edition, is hosted at FrOScon 2009
Showing entries 1 to 7