My program uses Perl DBI to connect to Oracle database, I have an strange issue as explained below-
I have a select query in my program, which uses to compare data between two dates (start date and end date)and selects it,
( WHERE REC_STATUS = 'A' and UCSIIU_RECEIPT_AT_MOT_DT between to_date( +? ,'mm/dd/yyyy') and to_date(?,'MM/DD/YYYY ) ) OR (UCSIIU_RECEIPT_AT_MOT_DT between to_date(?,'mm/dd/yyyy') and to_da +te(?,'MM/DD/YYYY) AND REC_STATUS = 'I'))
I found that when I pass these four parameters as variable (using bind_param function), the perl script is taking four to five hours to execute the query ($sth->execute) in the perl script, however when I hard code these parameters (dates) in the select query this query is executed within ten minutes of time.
In brief when I hard code the date parameters inside query the perl script takes 10 to 15 min to execute, but if I pass date parameters as variables this script is talking more than five hours to execute, it hangs in a single ,step $sth->execute for a very long tome.
I am unable to get the cause of this problem; your suggestion to this problem is heartily welcome.
Thanks in advance,
Ram
20060925 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
2006-09-25 Retitled by GrandFather, as per Monastery guidelines
Original title: 'Hi Monks,'
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |