My Other Blog

Sometimes you may want to try visiting my other blog (http://erikdt.blogspot.com/).

Why a separate blog? Just in case I shit in my blog. So that the contamination can be contained.

I lied. I’m simply Torn between Two Blogs.

Have a nice day and don’t forget that shit happens.

Possible Solution to InnoDB Slow Insertion on MySQL

Let’s say you have a table stored using the InnoDB storage engine in a MySQL schema, created by something like this perhaps

CREATE TABLE my_schema.my_table (
    ...
) ENGINE InnoDB;

and want to insert several rows. You quickly find that such insertion is extremely slow compared to tables stored using MyISAM engine.

Try placing the insert statements in a transaction. Surround your inserts with START TRANSACTION and COMMIT, so they look like

START TRANSACTION;
INSERT ...
INSERT ...
INSERT ...
COMMIT;

That seems to work for me, at least for small tables (around a hundred rows). I haven’t tried it for large tables, so for now I can only wish you luck.

My hypothesis is MySQL autocommit is somehow a majour performance hit on the InnoDB storage engine. I don’t really bother to know what’s happening under the hood. Perhaps someone else can elaborate that?

Inconvenient Dilemmata

If A claims to be true, and B claims to be true, whereas A and B are irreconcilable, then are both of them true, is one and only one of them true, or none of them is true? Now, if A is a religion, and B is another religion, is the case getting brighter or murkier? It is going nowhere. This is a dilemma in which the two choices are not seemingly true, but also not seemingly false either.

We can’t know for sure. We don’t really know anything. One shall not feel as if he knew everything. Yeah, especially the fanatics. Are they really sure that what they feel right is right? How can they be so sure? Have they ever experienced it? How can they be so arrogant, so cheeky, so impertinent, so blind, and deny the opinions of others, while they are standing on the same ground? Do they know where heaven is, or what it is? If no, why do they brashly state that they will go there? Is that not trespassing the right of God? Is it not the case that only God has the right to decide who goes where?

I don’t state that it is trespassing the right of God; I don’t make it as a falsifiable statement. I do not want to arrogantly advertise things whose truth I do not know as things I proclaim to be true. I do not want to preclude the slightest possibility of truth.

I pity blind men not, but those who cling so blindly to his belief that he is no better than a blind man. We have eyes to see, so see! We have ears to hear, so hear! We have brains to think, so think!

Love and Hate

Yesterday, love didn’t need a reason.

Today, hate doesn’t need a reason.

Why do some people love being hated?

Hemmm…

Hari ini ada empat kuliah.

Saya bolos semuanyah.

Main Fallout tigah.

Gilah.

Jakarta, 2008 Februari 1

Mega mendung; kota terapung.
Duka merundung; istana terkepung.
Telaga meluap; manusia terlelap.
Air lepas tanpa batas.

Miracles

Either there is no miracles, or everything is a miracle.

Somebody said that miracles happen at all times. By the very definition of miracle, however, it is an absolutely necessary that an event is extremely rare in order for it to be somewhat eligible to be called a miracle; otherwise, it is not a miracle at all.

Everything used to be a miracle. However, as scientific theories are developed, many miracles are now historical. Nevertheless, regardless of how far we elaborate our theories of everything, there will always be at least one miracle, since we can always ask “Why is it so?” and since the answer “Because God wants it to be so.” is never satisfactory to the scientific community.

There is a miracle which occurs only once while is occurring at all times. That miracle is time itself. Time exists, at least within itself, only once, doesn’t it?

My conclusion is that we won’t run out of miracles.

Some Words on Learning

To do something the right way, learn to do it the wrong way.