473,749 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ORACLE MIGRATION - CASE Statements.

All.

We have LOT of variables declared in the Oracle package as ORACLE
CONSTANTS like,

v_test CONSTANT INTEGER=1;
When converting to DB2, MTK changes each of these CONSTANTs into
functions. This typically increased the count of the functions.

create function v_test()
return int
....
....
return 1
Instead of SO MANY functions in DB2, we have written one single
function with CASE statements for each constant value

select CASE WHEN 'TESTING' THEN 1
WHEN 'CODING' THEN 2

.....
.....
END

Is there any performance implications in doing the above? having
multiple CASE statements in a single function? or shld we go for DGTT?

Nov 12 '05 #1
1 1896
db*****@yahoo.c om wrote:
All.

We have LOT of variables declared in the Oracle package as ORACLE
CONSTANTS like,

v_test CONSTANT INTEGER=1;
When converting to DB2, MTK changes each of these CONSTANTs into
functions. This typically increased the count of the functions.

create function v_test()
return int
...
...
return 1
Instead of SO MANY functions in DB2, we have written one single
function with CASE statements for each constant value

select CASE WHEN 'TESTING' THEN 1
WHEN 'CODING' THEN 2

....
....
END

Is there any performance implications in doing the above? having
multiple CASE statements in a single function? or shld we go for DGTT?

These MTK dudes are quite inventive....
I don't see a problem with the functions.
Especially since this is static SQL the function will have the same
encapuslating effectand performance characteristics as the package
CONSTANT in Oracle.
If you went with a runtime solution (like using a CASE expression or
doing a select from a table) you will hurt performance.
You will need to do enough tuning after the migration as is...

Cheers
Serge

PS: Did I point you to my artcicles? If not search for my last name on
www.ibm.com. You will find references to a profiler and an article on
tracing and tuning. Get familiar with both.

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
19993
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
4
3986
by: Abram Friesen | last post by:
Hi, I'm a developer for a software application vendor, and our application makes use of a customer-maintained Oracle 8i/9i database. We've had a customer request to support DB2 database, and I'm looking into the feasibility of migration. Our application runs on NT Server and, the DB2 database would be in some cases on a separate AIX machine, in other cases on an AS/400. There are two problems we are running into, both relating to our...
8
3786
by: Tavish Muldoon | last post by:
At a high level - what would be involved in switching from Oracle to DB2? Pretty vague, I know - but anyone have experience with this kind of migration? Pointers? Things to look for? Tmuld
2
1825
by: _link98 | last post by:
Does IBM publish a complete list of features (of Oracle) which the IBM migration toolkit does *not* convert? The docs seem rather vague. For example: 1. What support for the oracle object-relational features (objects and member procedures etc). 2. any support for removing substitutable parameters in DDL (in sqlplus scripts) like "&&1". or &&1.. etc.
5
2068
by: Amueerie | last post by:
this may seem a trivial question (as .net may have been solely developed for this purpose), but i'm not certain whether this is possible, i.e. is it possible to access an Oracle DB in .NET (and is it the same as accessing any other db - except for the connection string & object). What is mean is, can i use the same select statements, update statements with the orable database that i used with MSDE & SQL database? thank u all
56
4954
by: Ashish Patankar | last post by:
I want to migrate my Oracle 10g database to Db2. I want some documentation for the comparision between these to databases. I also want to know which features of Oracle 10g are supported by Db2 and which are not supported.
2
14245
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers: Additional Array INSERT and SELECT Syntax Support by Pro*C/C++ and Pro*COBOL Precompilers: Dynamic SQL Statement Caching in Pro*C/C++ and Pro*COBOL Precompilers: Fix Execution Plan in Pro*C/C++ and Pro*COBOL Precompilers: Flexible B Area Length...
3
1084
by: Girish | last post by:
Hi all, We are doing an exercise of migrating an application (developed in Informix 4gl) from Informix to Oracle database. Before doing actual migration, we would like to know some of the key advantages of Oracle over Informix. If there are any examples of any company getting benefits because of this kind of migration, please reply me such kind of case studies. Please reply to my email id.
4
5746
by: --CELKO-- | last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any kind of tools for this?
0
8833
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.