What does dual in Oracle mean?

Source: Internet
Author: User

This is a virtual table. You can use this table when operating most Oracle Objects, such as sequence and sysdate.
For example, select sysdate from dual
Select seq1.nextval from dual
And so on.

1. Dual is created by SQL. bsq. When each database is created, SQL. bsq needs to be run once. Therefore, each database has a dual table.

2. Who is the owner of dual? -- Sys
(Select owner, table_name from dba_tables where table_name = 'dual'

3. When is dual table frequently used?

I usually do time stamps in batch script.
Connect internal;
Select to_char (sysdate, 'yy-MON-DD hh: Mi') from dual;
................

There are not many values used for operations or sequence. Developers may use a lot of resources.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Performance issues caused by dual.

If you don't use a lot of dual, you don't seem to have to worry about it. I have not seen databases that require access for more than dual times a day. However, according to the article, it is a good way to create an index for dual (8i and earlier), and analy table dual comput statistics should always be done.

You can also use where to create a view for x $ dual so that it can be stored in memory. If you use it frequently, performance cost is reduced.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.