Thanks for help with sloooow query
Posted in 1994
31-Oct-1994
Thanks to all the helping people, for nice solutions to my problem with
a query:
The not very fast version of the query:
---------------------------------------
>select * from ks_gdkonto
>where gd_kontonr = "0003573508"
>and gd_prod_kode < 90000;
The fast version:
-----------------
select * from ks_gdkonto
where gd_kontonr = "0003573508"
and gd_prod_kode < '90000'; ^ ^
! !
+---------------+------------ This is a char(5) field.
The select executes perfect now.
Regards
-----------------------------------------------------------------
Databaseadministrator Poul Pedersen
Kuwait Petroleum (Danmark) A/S
Hummeltoftevej 49 Mail: pp@q8.dk
2830 Virum Voice: +45 45 98 45 94
Denmark Fax: +45 42 85 14 18
-----------------------------------------------------------------