BTW how what's your table average row length?
Actually your statement needs approximately 1 GB in rollback segment at least, so it's not so simple as it looks like :).
Regards, Dima
http://seminihin.narod.ru
You may utilize Advanced Queuing and execute the real piece ow work only on receiving event from previous successfully completed job.
The same way you may implement problem notification etc.
Another (actually almost the same) idea is to use separate application for orchestrating your jobs. Or...
Did you specify database alias?
If so then most probably your profile contains information about TNS_ADMIN - a place where your tnsnames.ora locates. Thus without this file you're connecting by host name rather than tns alias. Accidentally connect string coincides with the host name where...
Oracle may utilize its INDEX FAST FULL SCAN method and read all fields directly from index not accessing table at all. But only in case your query uses only those 2 fields in index.
Regards, Dima
http://seminihin.narod.ru
Alternatively to using explicit conversion you may alter default format mask on session (or even system) level by invoking
alter session set nls_date_format='<whatever you need>'
After such command you may rely on Oracle implicit conversion and be sure that data selected from date field and...
You may utilize old good DBMS_SQL package. It's a bit more cumbersome than already mentioned EXECUTE IMMEDIATE but also a bit more flexible.
Regards, Dima
http://seminihin.narod.ru
Just a small elaboration (most probably needless but...)
Oracle SQL and PL/SQL DATE internal representations slightly differ, so don't be confused by that dump(sysdate) and dump(<date column>) show different lengths and moreover different types
Regards, Dima
http://seminihin.narod.ru
What is your client application? If you use some middle tier, it's possible that after upgrade/migration/smth. else the autocommit parameter was set to "true" (actually the default behaviour for many systems) and commit is issued after each statement.
Regards, Dima
http://seminihin.narod.ru
I'd also recommend you to avoid NLS-specific format masks, as Dec is not the common name of 12-th month in any language ^)
Regards, Dima
http://seminihin.narod.ru
+1. Oracle cost calculations are based on statistics and some initialization parameters describing hardware in used. E.g. optimizer_index_cost_adj, optimizer_index_caching. So the cost is based on some assumptions, not quite correct in some cases. Only tracing provides real numbers though only...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.