Tag Archives: sql

Remote Surprise

Here is an example of surprising behaviour from a remote DB from an OTN forum thread Setup a link to a remote DB (I’ve used an actual remote DB and not tested a loopback) Remote DB: Local DB: Then alternate variations on this sequence of events: 1. On local DB execute SELECT: 2. On remote […]

Index suggestion from the access advisor

Test case : create table t(x varchar2(8) primary key,   y varchar2(30)); insert into t(x,y) select   to_char(rownum,’FM00000000′),   object_name from all_objects where rownum<1e4; commit; exec dbms_stats.gather_table_stats(user,’T’) One user wants to filter on x but does not do the casting properly SQL> select * from t where x=00000001; X        Y                             ——– —————————— 00000001 CON$ He received the expected data. […]