View previous topic :: View next topic
|
Author |
Message |
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Hi,
I want to join two tables...
Say TableA, TableB.
Columns of TableA
C1 SMALLINT
C2 VARG(16)
Columns of TableB
C1 SMALLINT
C2 VARCHAR(40)
I have the below query.
Select * from TableA, TableB
where TableA.C2 = TableB.C2.
I want to know will there be any performance overhead in this case? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How many rows are in the tables?
How are the keys defined for these tables?
How might a graphic value be equal to a varchar value? |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
As of now I am not sure on the number of rows... Keys/Indexes are defined on different columns....
Varchar in Unicode can accommodate 1,2,3 byte char and Vargraphic is 2 byte char set.
I tried matching few rows, they were matching.... I think DB2 does implicit type conversion here. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I suspect that if the WHERE has keys that are the same to match on, there would be little or no performance degredation (other than, of course, sheer volume.
Good luck, and we'd be interested to hear about how it goes |
|
Back to top |
|
|
|