Showing entries 38241 to 38250 of 43769
« 10 Newer Entries | 10 Older Entries »
My first Groovy program

When I heard the JavaPosse interview about Groovy I became really interested in it. The fact that it offers a scripting language based on the JVM and that it can be seamlessly integrated with Java fascinated me.

So I decided to buy the Groovy in Action book and try it out.

This is my first attempt at something that might become useful later:

def foundtypes = [:]
def sum = 0              
def stats = ""

bugs = new XmlSlurper().parse(new File("/home/ds/findbugs.xml"));

bugs.BugInstance.findAll { instance -> 
    instance.-AT-category =~ 'CORRECTNESS|BAD_PRACTICE|MT_CORRECTNESS'
}.each { instance ->
 type = instance.@type-DOT-toString()
 foundtypes[type] = foundtypes.get(type,0) + 1
}
foundtypes.each { sum += it.value }

println "Found ${foundtypes.size()} …
[Read more]
My first Groovy program

When I heard the JavaPosse interview about Groovy I became really interested in it. The fact that it offers a scripting language based on the JVM and that it can be seamlessly integrated with Java fascinated me.

So I decided to buy the Groovy in Action book and try it out.

This is my first attempt at something that might become useful later:

def foundtypes = [:]
def sum = 0              
def stats = ""

bugs = new XmlSlurper().parse(new File("/home/ds/findbugs.xml"));

bugs.BugInstance.findAll { instance -> 
    instance.-AT-category =~ 'CORRECTNESS|BAD_PRACTICE|MT_CORRECTNESS'
}.each { instance ->
 type = instance.@type-DOT-toString()
 foundtypes[type] = foundtypes.get(type,0) + 1
}
foundtypes.each { sum += it.value }

println "Found ${foundtypes.size()} …
[Read more]
Log Buffer #32: a Carnival of the Vanities for DBAs

The 32nd edition of Log Buffer, the weekly review of database blogs, has been published by Lewis Cunningham on An Expert’s Guide to Oracle Technology. Over to you, Lewis — Log Buffer #32.

Engine Updates, Skeleton, Talks, Information Schema

I've updated the Skeleton Engine. It is the example engine from inside of MySQL placed in a skeleton project with a complete setup for Automake done for you already (and an example plug.in file for compiling). I've added a flag I found that PBXT had added to the ac_mysql.m4 file and I have also incorporated the changes sent to me for adding Windows support. Several engines now make use of its initial framework and I am happy to take back examples for it:

http://hg.tangent.org/skeleton-mysql-engine

This week I gave a presentation at the PHP Vancouver conference. I showed off how to write a pluggable I_S (wrote it the span of about two hours). You can get the code from here:
http://download.tangent.org/vmstat_information_schema-0.1.tar.gz

[Read more]
Using index for ORDER BY vs restricting number of rows.

One interesting problem with MySQL Optimizer I frequently run into is making poor decision when it comes to choosing between using index for ORDER BY or using index for restriction.

Consider we're running web site which sell goods, goods may be from different categories, different sellers different locations which can be filtered on, and there are also bunch of fields which sorting can be performed on such as seller, price, date added etc.

Such configuration often causes serious challenge choosing proper index configuration as it is hard to add all combinations of restrictions and order by to be fully indexed.

An extra problem comes from the fact MySQL prefers when it is possible to use index for further restriction and than using file sort, rather than using index for sorting and doing non-index based filtering for further restrictions. Here is example:

PLAIN TEXT SQL:

  1. CREATE TABLE …
[Read more]
moving around

jan.kneschke.de is back online again. The old server got old and rusty and it has taken while to get everything setup again.

The most important articles are online again:

The old photo-storage is disabled, but a few new pics got uploaded to flickr, e.g. from my trip to Argentina:

Buy Used Hard Drives for your RAID

Some of the common conceptions of data storage seem to have been blown out of the water.

Two things I found interesting:

In their study they found that there was no correlation between disk failure rates and utilization, environmental conditions such as temperature, or age. This means that high disk utilization or age of the disk have no significant impact on the probability that it will fail.

...

They observed that older disks had a much lower failure rates then newer disks, where the newer disks in general were less expensive.

Which makes me think that buying used HDDs off Craigslist might not be a bad idea.

One could buy cheap 15k RPM low latency disks from a few years ago and forget about the storage capacity in exchange for FAST seek time.

Of course it depends on how …

[Read more]
building sigar

SIGAR is a cross-platform API to gather system-specific performance-data. It is developed by Hyperic and released under the GPL. We use it at MySQL as the backend for our monitoring agent.

Sadly SIGAR requires ant for building as it is meant to be used with a JNI-wrapper in Java applications. Real men use C, so we need something else for building: cmake.

cmake

cmake is a cross-platform, autotools replacement. It works on Unix and win32 and generates native Makefiles. On Unix it is make, on win32 it is nmake, on macosx uses the XCode framework.

That keeps even the build portable. You can get a binary from …

[Read more]
pxtools 0.0.20 released

Download

Known Bugs

The 64bit build of pxtools-0.0.20 will create wrong table names as seen in the comments below. As workaround use the 32bit version:

$ apt-get install pxtools:i386
php shell

The more I work with other languages like python and ruby I like their way how they work on problems. While PHP is very forgiving on errors, it is weak on the debugging side. It was missing a simple to use interactive shell for years. Python and Ruby have their ipython and iruby shell which give you a direct way to interact with the objects. No need to write a script and execute it afterwards.

Features

  • tab-completion (if readline() support is compiled into php)
  • handles FATAL errors (like calling a undefined function)
  • inline help
  • autoload() is enabled by default
  • works on all php platforms (shell wrappers for Unix and Windows)

Requirements

  • PHP 5 or later
  • ext/tokenizer has to be enabled (this is the default)
  • ext/pcre has to enabled (this is the …
[Read more]
Showing entries 38241 to 38250 of 43769
« 10 Newer Entries | 10 Older Entries »