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...
You may use Data Modeler from Oracle SQL Developer. It's both free and cross-platform. As a free bonus you'll obtain import from ERWin and MS XMLA
Regards, Dima
http://seminihin.narod.ru
In case NLS_LANGUAGE and NLS_SORT are not specified explicitly (in registry or as environment variables or in scripts mentioned by carp), they're derived from NLS_LANG.
BTW is this
...
and l.period_num >= '04'
and l.period_num <= '04'
...
not the same as
...
l.period_num = '04'
...
...
Don't forget about translate() function, e.g.
case
when translate(I.INSADDR1, '.1234567890', '.') = I.INSADDR1 then
TRIM(I.INSADDR1 || ' ' || I.INSNAME)
else
I.INSNAME
end
Using owa_pattern is more readable but less efficient.
If you're lucky to be on...
Most such issues are "implicit type conversion" - related (character to number, character to date and vice versa). You may expect similar results in similar NLS environments (don't forget about collating sequence) but IMHO avoiding implicit conversions is a better way to get not just similar but...
Another possible reason of slow delete may be some foreign key constraint, especially with non-indexed key. This is not for topicstarter but maybe for anybody else.
Dave, you may not only delete but also update [key-preserved] queries. This is especially usefull on queries joining master-detal...
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.