[PHP-DB] Oracle join on 2 int fields vs. char or float field From: Dan Fitzpatrick (dan <email protected>)
Date: 11/30/00

Does anyone know whether it is faster to left join on two integer fields
or one text field or one float field?

CHAR
select t1.f1, t2.f1 ...
from t1, t2
where t1.char_field_1 = t2.char_field_1(+)
and ....

The char field would be something like 12345-9876543

OR
FLOAT
select t1.f1, t2.f1 ...
from t1, t2
where t1.float_field_1 = t2.float_field_1(+)
and ....

The float field would be something like 12345.9876543

OR
2 INTEGERS
select t1.f1, t2.f1 ...
from t1, t2
where t1.int_field_1 = t2.int_field_1(+)
and t1.int_field_2 = t2.int_field_2(+)
and ....

The integer fields would be 12345 and 9876543

Thanks,

Dan

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>