-
A cool thing with EXCHANGE PARTITION (part 2)
In the previous post, I showed that even though a partition was “removed” (ie, exchanged out) from a table, a query running against the table could still successfully run the completion. However, of course, if once that partition is exchanged out, it is now a table in it’s own right…and is subject to the whims Read more
-
Those pesky dates as strings
You might be thinking “Nothing is more frustrating that encountering a string column that is full of dates”. But there is something worse than that…and that is, when that string column is full of potential dates, and your job is to sift out the good data from the bad data. For example, if your table Read more
-
OTN Yathra– scenes from Bangalore and Hyderbad
It’s sad that I could not capture in pictures the amazing sights and sounds from both inside the conference and outside in the streets of these amazing places. I was too busy just absorbing it myself and neglected to take enough pictures But again, a truly wonderful couple of days. Read more
-
OTN Yathra Chennai
Rather than try to convey in words the first couple of days in India, I thought I’d share some of the images from the first days here in India, covering the Chennai conference. Enjoy Read more
-
Subtle variations in optimizer stats
Subtle variances in the way you work with statistics can have a significant impact on how your optimizer plans work out…so you need to take care. Let’s look at the following example SQL> create table T ( 2 x varchar2(20) , y varchar2(100)); Table created. SQL> insert into T 2 select ‘x’ , rpad(‘z’,100) from Read more
-
Quick tip on Function Based Indexes
For “normal” indexes, USER_IND_COLUMNS will contain the column name(s) for an index, but things (appear to) go astray when looking at function-based indexes. SQL> create table blah ( x varchar2(30)); Table created. SQL> create index blah_ix on blah ( upper(x)); Index created. SQL> select column_name from user_ind_columns 2 where index_name = ‘BLAH_IX’ 3 / COLUMN_NAME Read more
-
A little known RI clause
Most people are aware of this standard referential integrity control, namely you can’t delete the parent if children exist SQL> drop table PAR cascade constraints purge; Table dropped. SQL> create table PAR ( p int primary key, data int); Table created. SQL> insert into PAR 2 select rownum, rownum 3 from dual connect by level Read more
-
Active and Inactive Sessions
Most people are aware of the STATUS column in V$SESSION. If it’s ‘ACTIVE’ then that connection is in the process of consuming database resources (running a SQL statement etc). However, a lesser known column which is probably even more useful is the LAST_CALL_ET column. The name suggests the time since the last call, but the Read more
-
Why PLSQL ?
With Collaborate 2016 under way, there seems no better time to reflect on why PL/SQL is the natural choice for anyone who loves to code, and loves their data Read more
-
Technology debates
As always happens from time to time, we had the following request on AskTom today: Could you list down 2 reasons why sql server is better than oracle? Then 2 counter reasons as to why why oracle is better than sql server And I thought I’d reproduce my response here I’ll answer it Read more
-
Scheduler frequency and repeat intervals
When using strings such as “FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI; BYHOUR=9,10″ within the scheduler, sometimes its not readily apparent how this will translate to actual dates and times of the day that the scheduled activity will run. To help you understand, a nice little utility is to use EVALUATE_CALENDAR_STRING” SQL> set serveroutput on size 999999 SQL> SQL> declare Read more
-
AskTom – the personal touch
AskTom has been answering questions from the user community for nearly 16 years. But what if that service could have an even more personal touch ? We are pleased announce the largest advance in AskTom service since it started way back in 2000. See all the details in the video below for the new service Read more