Archive for the 'Database' Category

Aug 08 2008

Is open source database a viable solution?

Published by biexplorer under Database, Interesting stuff

Please read the article at this link.

What do you think? Is open source database a viable solution?

The link says (as quoted by Forrester) that the market share for

  • Open source database is at $850 million
  • Commercial databases is $ 16 billion

Continue Reading »

No responses yet

Jul 18 2008

Displaying & reading execution plans

Published by biexplorer under Oracle

Here is a good link on Explain plans and on displaying them.

http://optimizermagic.blogspot.com/2008/02/displaying-and-reading-execution-plans.html

No responses yet

Jul 12 2008

Min and Max in same query

Published by biexplorer under Oracle

I was reading this today and thought it was interesting.

Karen explains why having min and max in the same query impact performance and how to tackle the same.

No responses yet

Jun 03 2008

DB2 performance tuning

Published by biexplorer under DB2

Here is a good article on tuning DB2 databases.

And here is another that might help you.

No responses yet

Apr 26 2008

Migration of a DW solution from Oracle to DB2

Published by biexplorer under BODI, DB2, Migration

Recently we migrated an entire DW module from Oracle to DB2. And our ETL was done using Business Objects Data Integrator.

Below is a sequence of steps that we followed to migrate the entire solution (including data structures, ETL code and universe)

Assumption:
–>All estimates done for 4 DB2 databases, 3 federated systems, 62 tables, 33 indexes, 6 DI jobs, 110 data flows, 151 transformations, 16 SQL transforms, 34 SQL() scripts, 220 objects in 23 classes and 2 reports.
–>Add 20% time as buffer for unexpected issues.
–>Some tasks can be executed in parallel, while some have strong dependency on completion of previous tasks.

Work breakdown of migration and rough estimation:

1. Initiation & planning : 40 Hrs
Establish objectives and goals
Requirements gathering
Establish scope
Plan resources
Identify development environment

2. Assessment : 40 Hrs
Assess tool and technology needs
Assess and understand technical requirements
Establish technical guidelines
Finalize tools and development environment

Continue Reading »

No responses yet

Apr 26 2008

Learning IBM DB2

Published by biexplorer under DB2, Database

I am currently researching and learning more about IBM DB2.

We recently migrated a module from Oracle to DB2 without having a single DB2 resource. Most of it was done on a research, trial and error basis.

And we had some great learning experience.

I will share those experiences with you soon.

In the meanwhile, if you know some great DB2 resources or help sites, please do leave a comment.

No responses yet

Mar 26 2008

NULL and NOT IN (Oracle)

Published by biexplorer under Oracle, Uncategorized

Here is a very interesting scenario.

I have an employee table called EMP.

1

And I have a DEPT table.

2

Now, I write a query to find out all the employees who are part of any department. (DEPT_ID is properly updated and found in DEPT table)

3

Now, I want to know if any employee is not part of any department.

4

What??? No results? I know that employee with EMP_ID 9 doesn’t belong to any department. Where did he go?

Is Oracle drunk? Is it giving me wrong results? Wait let me check with another query.

Continue Reading »

No responses yet

Feb 26 2008

Denormalization.. normalization.. confusion

I am a big fan of Vincent McBurney. Today I was reading this post.

I agree completely with his view on Denormalization. (Scroll to the bottom of the article).

At times, I have had difficulties in recalling if normalization is splitting or joining. And it does make a lot more sense to just call them ’split’ and ‘merge’ instead of ‘normalize’ and ‘denormalize’.

Just another instance where plain common sense could have been helped everyone.

One response so far

Aug 03 2007

High water mark and full table scans

Published by BI Explorer under Oracle

Hi,
In Oracle databases, what is this high water mark? What impact does it have on the full table scan?

Well, HWM is an indication that segregates used and unused blocks. Above the high water mark you find the unused blocks and below it the used blocks.

Used blocks can be
1. Free - unoccupied
2. Used - occupied

As the data grows in a table, the high water mark starts moving upward. The only way to bring it down is to rebuild or truncate the table.

And a full table scan reads from the beginning of the table to the high water mark.

When you insert data into a table and then delete it later, the high water mark doesnt move down. So when you insert a million records into a table, the HWM moves up. A full table scan will scan as if there are a million rows. When you delete 0.9 million records from it, the high water mark doesnt come down. A full table scan will still scan as if there are a million records.

The ideal way to handle this is by repacking the table

alter table {TABLE_NAME}
move;

And keep 2 more things in mind.
1. Indexes size will remain same. That has to be repacked.
2. Indexes will be invalidated.

So, rebuild the indexes to fix these 2 issues.

No responses yet

Jul 25 2007

Truncate and delete

Published by BI Explorer under Oracle

Truncate:
1. Moves the high water mark down to beginning.
2. Doesnt need commit. It is a DDL command.
3. No condition needed. Removes all rows.
4. Extents are deallocated. (If you specify the reuse storage clause, then the extents are not deallocated)
5. No rollback.

Delete:
1. Doesnt change the high water mark.
2. Needs commit. It’s a DML command.
3. Can specify a condition and remove specific rows.
4. Extents are not deallocated.
5. Changes can be rolled back.

No responses yet

Next »