AskTom - Hot Questions

Subscribe to AskTom - Hot Questions feed AskTom - Hot Questions
These are the questions on Ask Tom that have the most comments
Updated: 1 hour 12 sec ago

new install, moving connections from one machine to another

Wed, 01/08/2014 - 00:00
i recently had a virus which required a reinstall of the os on a windows 7 machine. this required me to reinstall oracle sqldeveloper. i have another machine with sqldeveloper and all it's connections. can i move these connections en-masse to th...

locking with select for update vs. using single statement

Wed, 01/08/2014 - 00:00
Hi Tom, 1) Thanks for all the great work you do. By the way, when I interview people (I'm a software developer and interview people for such positions) I have recently added a standard interview question that I always include: "Where do you put ...

Why is the optimizer so wildly off ?

Wed, 01/08/2014 - 00:00
Hi! I recently had a Problem with 2 SQL-Statements performing an equal query, but with wildly different runtimes. I think I narrowed the problem down to a simple case, where the optimizer is wildly off. The statistics are up to date and fit the actua...

What performs better NVL or DECODE for evaluating NULL values

Tue, 01/07/2014 - 00:00
Afternoon, Could anyone tell me which of the following statements would perform better? <code> SELECT 1 FROM DUAL WHERE NVL (NULL, '-1') = NVL (NULL, '-1') </code> OR <code> SELECT 1 FROM DUAL WHERE DECODE(NULL, NULL, '1', '0') = '...

How to control read access to the global context

Tue, 01/07/2014 - 00:00
Hi Tom, I'm wondering if there is a way how to control who has <b>read</b> access to the global context. What I'm trying to achieve is this: Keep encryption key in memory so database sessions can encrypt/decrypt data (DBMS_CRYPTO). I can't stor...

Raise error while open distributed transaction

Tue, 01/07/2014 - 00:00
create table foo (c1 varchar2(10)); Now, if i try to use the table over db link like <code> begin insert into foo@dblink(c1) values (null); end; / </code> and then <code> begin raise_application_error(-20422, 'Test!'); end; / </c...

New edition of Expert oracle Database Architecture book.

Tue, 01/07/2014 - 00:00
Hi Tom, Happy New Year!!! I remember reading in one of your blogs that there is a plan to release new edition of Expert oracle Database Architecture book covering the latest oracle version.Is there any tentative date for the release of the book ? ...

Join factorization

Tue, 01/07/2014 - 00:00
Tom, I was reading about Join Factorization from Optimizer blog. And ended up with the below scenario where Join Factorization doesn't takes happen. <u></u...

Default value for columns

Tue, 01/07/2014 - 00:00
Hello Tom, I have a strange behavior regarding default values on columns. I have different executions plan for a same "select" statement following I add a column with a default value in a existing table or I create the table with the default value...


Tue, 01/07/2014 - 00:00
<code> Hi, Tom I wrote the following procedure, there are two PLACEHOLDERs which means two bind variables and the two PLACEHOLERS have the same name, that is to say ,the name of PLACEHOLDERs are identical, they are both "MYTEST". In the ...

SQL with plan change

Tue, 01/07/2014 - 00:00
Hi Tom, I need to figure out the SQL's with multiple execution plans and when did the plan got changed also. I queried the V$SQL table, please find the query below. select * from v$sql where sql_id in( select sql_id from v$sql group by sql...

Pro*C and HINTS

Tue, 01/07/2014 - 00:00
Hi Tom, I have a query with hint which is used in Pro*C like select /*+ index(emp,pk_emp_id) */ from emp where emp_id = l_empid; When we run this Pro*C job and generate a tkprof file this query appears as select /*+ index(emp,pk_emp_id) ...

The SQL pivot in clause

Mon, 01/06/2014 - 00:00
Hi tom, Thanks for submitting my question and really appreciate your response. I have a question about SQL pivot in clause using subquery. If I used the fixed string, it works fine. However, I'd like to use subquery to make it more flexable. ...