Striving for Optimal Performance
  • Home
  • Blog
    • Archive
    • Categories
  • Troubleshooting Oracle Performance
    • Description
    • Structure
    • Table of Contents
    • Forewords
    • Reviews
    • Downloadable Files
    • Addenda and Errata
  • Publications
  • Public Appearances
    • Past Public Appearances
  • Contact
  • Search
  • About

Monthly archives for September, 2009

Ad: Oracle Database 11g Release 2 Seminars

Sep25
2009
2 Comments Written by Christian Antognini

The company I work for, Trivadis, organizes a series of 1-day seminars covering the most important features of Oracle Database 11g Release 2. The following dates and locations are currently planed (some more might be added later on):

  • 2009-12-10 Zurich (CH)
  • 2010-01-19 Frankfurt (DE)
  • 2010-01-20 Munich (DE)
  • 2010-02-02 Stuttgart (DE)
  • 2010-02-04 Vienna (AT)

My involvement with these seminars is twofold. First, along with several colleagues of mine I’m currently testing the new features and writing slides not only about how they (should) work, but also about the problems we experience during our tests. Second, I’ll be presenting, along with another colleague (every seminar has two speakers), at the seminars in Zurich, Frankfurt and Munich.

Addition information is available here.

Posted in 11gR2, Speaking, Trivadis

Script to Download 11gR2 Documentation

Sep09
2009
9 Comments Written by Christian Antognini

I don’t know you, but I like to work with the PDF version of the documentation. The problem is that the PDF files have names that are not very useful (or do you remember that the SQL Reference Guide is named e10592.pdf?). Hence, when I download the documentation, I like to store each PDF with its title as a file name. In addition, for easy access, I put them under the My Documents menu. The following image shows how it looks like on my laptop.

The structure of the menu under My Documents

It goes without saying that doing that for the 148 files of the documentation library is not only boring, but it is also very time consuming. Hence, I did it in the following way:

  • opened the master book list
  • extracted the HTML code associated to the table containing the list of PDF files
  • applied a small XSL transformation to generate a script that downloads all files
  • executed the script

In this way I just had to start the script and about 10 minutes later the whole documentation library was stored locally. Note that with such a script it is also very simple to periodically re-download all files. Just to keep them up-to-date…

If you think that it is something useful for you, feel free to download it by clicking the following link: download.cmd. The only requirement is that wget must be installed on your system. For me GNU Wget works fine.

Update (6:16 pm): a colleague of mine, Dani Rey, sent me a KSH version of the script. Feel free to download this one as well: download.ksh. Thank you Dani!

Update 2011-04-01: this post provides scripts to download the documentation of 10.2, 11.1 and 11.2.

Posted in 11gR2, Documentation

Deferred Segment Creation

Sep04
2009
24 Comments Written by Christian Antognini

As you know Oracle Database 11g Release 2 was just released. As a result, it is time to start a series of post about some new features. I’ll start with one that is not really related to performance… In fact, this post is a kind of follow-up to a comment written by Bernd Eckenfels about one of my previous posts: System Managed Extent Size – 11g Improvements. The following is an excerpt of Bernd’s comment:

One thing about uniform size and initial segments I hate is, that an empty segment (lob column) always uses up one extend. This wastes a lot of storage if the col is unused. And as a software vendor you never know when a customer will use the segment.

I agree with Bernd, this might be a real problem when you have a lot of unused segments. Oracle also recognized this issue and, in Oracle Database 11g Release 2, provides a partial (yes, only partial…) solution: deferred segment creation. The idea of deferred segment creation is very simple. The segments related to a table or an index are not immediately created when the CREATE TABLE or CREATE INDEX statement is executed, but only when the first row is inserted into the table. Let’s have a look to an example:

SQL> CREATE TABLE t (n number);

Table created.

SQL> SELECT segment_created
  2  FROM user_tables
  3  WHERE table_name = 'T';

SEGMENT_CREATED
---------------
NO

SQL> SELECT segment_name
  2  FROM user_segments
  3  WHERE segment_name = 'T';

no rows selected

SQL> INSERT INTO t VALUES (1);

1 row created.

SQL> SELECT segment_created
  2  FROM user_tables
  3  WHERE table_name = 'T';

SEGMENT_CREATED
---------------
YES

SQL> SELECT segment_name
  2  FROM user_segments
  3  WHERE segment_name = 'T';

SEGMENT_NAME
------------------------------
T

It is important to point out that all segments related to a table are created when the first row is inserted into it. And that, even if they are not used to store data. For example, the segments for an index or a lob are created even if they are not used. This is the reason why I wrote that this is only a partial solution to the problem mentioned by Bernd. The following example illustrates this for a lob:

SQL> CREATE TABLE t (n number, c clob, b blob);

Table created.

SQL> SELECT column_name, segment_name
  2  FROM user_lobs JOIN user_segments USING (segment_name)
  3  WHERE table_name = 'T';

no rows selected

SQL> INSERT INTO t (n) VALUES (1);

1 row created.

SQL> SELECT column_name, segment_name
  2  FROM user_lobs JOIN user_segments USING (segment_name)
  3  WHERE table_name = 'T';

COLUMN_NAME  SEGMENT_NAME
------------ ------------------------------
C            SYS_LOB0000073904C00002$$
B            SYS_LOB0000073904C00003$$

In addition, the feature doesn’t work in all situations (yet). In other words, there are some restrictions. The most important, in my opinion, is that only non-partitioned table can take advantage of it. A full list of restrictions is obviously available in the documentation.

Note that deferred segment creation is enabled by default. To enable/disable it at the session or system level, you can change the initialization parameter DEFERRED_SEGMENT_CREATION. In addition, it’s also possible to enable/disable it for a single table by specifying the deferred segment creation clause.

Posted in 11gR2

EvoLve theme by Theme4Press  •  Powered by WordPress Striving for Optimal Performance