Thursday, March 18, 2010

Explain plan of Infobright

We all knw that Infobright is based on MySql. However, when I started with Infobright, I was equally unaware of both.

Today I got to know about Infobright's explain plan collection technique, and realized how different it is from Oracle's.

A typical explain plan from oracle talks about the path it follows to retrieve the data, and somehow makes common sense to read a plan.

On the other hand, an explain plan from Infobright looks nothing like the Oracle's plan. Its a set of cryptic rows put together. An example of such a plan -

2010-03-18 01:31:01 [4] T:-1 = TABLE_ALIAS(T:0,"myTableName")
T:-2 = TMP_TABLE(T:-1)
VC:-2.0 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:20))
A:-1 = T:-2.ADD_COLUMN(VC:-2.0,AVG,"
avg(col1)","ALL")
A:-2 = T:-2.ADD_COLUMN(VC:-2.0,MAX,"
max(col1)","ALL")
A:-3 = T:-2.ADD_COLUMN(VC:-2.0,MIN,"
min(col1)","ALL")
A:-4 = T:-2.ADD_COLUMN(,COUNT,"count(
1)","ALL")
VC:-2.1 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:2))
A:-5 = T:-2.ADD_COLUMN(VC:-2.1,GROUP_
BY,"col2","ALL")
VC:-2.2 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:5))
A:-6 = T:-2.ADD_COLUMN(VC:-2.2,GROUP_
BY,"col3","ALL")
VC:-2.3 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:7))
A:-7 = T:-2.ADD_COLUMN(VC:-2.3,GROUP_
BY,"col4","ALL")
VC:-2.4 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:11))
A:-8 = T:-2.ADD_COLUMN(VC:-2.4,GROUP_
BY,"col5","ALL")
VC:-2.5 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:12))
A:-9 = T:-2.ADD_COLUMN(VC:-2.5,GROUP_
BY,"col6","ALL")
VC:-2.6 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:13))
A:-10 = T:-2.ADD_COLUMN(VC:-2.6,GROUP_
BY,"col7","ALL")
VC:-2.7 = CREATE_VC(T:-2,PHYS_COL(T:-2,
A:-1))
T:-2.ADD_ORDER(VC:-2.7,DESC)
RESULT(T:-2)


And, guess what, to generate a plan, you have to change a setting in the initialization parameters file, and then bounce the db. I wonder if there have been any instances when someone had to look into production database's performance and therefore needed to look at some plan.

Being as new a system as it is, I cant really complain, since such things of maturity will slowly creep in. The focus right now is probably elsewhere, building the functionality, and probably performance.

in reference to: Infobright.org Forums | Enable MySQL Logging (view on Google Sidewiki)

No comments:

Post a Comment