We have moved to www.dataGenX.net, Keep Learning with us.
Showing posts with label index. Show all posts
Showing posts with label index. Show all posts

Monday, August 04, 2014

Oracle SQL Tuning Tips - 3



  • Oracle automatically performs simple column type conversions(or casting) when it compares columns of different types. Depending on the type of conversion, indexes may not be used. Make sure you declare your program variables as the same type as your Oracle columns, if the type is supported in the programming language you are using.Use:
    SELECT emp_no, emp_name, sal FROM emp WHERE emp_no = ’123′;
    HERE if emp_no indexed numeric, then after implicit conversion query will be:
    SELECT emp_no, emp_name, sal FROM emp WHERE emp_no = TO_NUMBER(’123′);
    Thus, index is used in this case.
    Don’t use:
    SELECT emp_no, emp_name, sal FROM emp WHERE emp_type = 123;
    HERE if emp_type is indexed varchar2, then after implicit conversion query will be:

    SELECT emp_no, emp_name, sal FROM emp WHERE TO_NUMBER(emp_type) = 123;
    Thus, index will not be used in this case.

Wednesday, February 12, 2014

Interview Questions : DataWareHouse - Part 4


What are the types of Synonyms?
There are two types of Synonyms Private and Public

What is a Redo Log?
The set of Redo Log files YSDATE, UID, USER or USERENV SQL functions, or the pseudo columns LEVEL or ROWNUM.

What is an Index Segment?
Each Index has an Index segment that stores all of its data.

Explain the relationship among Database, Table space and Data file?
Each databases logically divided into one or more table spaces one or more data files are explicitly created for each table space.


Tuesday, August 20, 2013

Oracle Interview Questions - Part-3


51. What is a database instance? Explain.
A database instance (Server) is a set of memory structure and background processes that access a set of database files. The processes can be shared by all of the users. The memory structure that is used to store the most queried data from database. This helps up to improve database performance by decreasing the amount of I/O performed against data file.

52. What is Parallel Server?
Multiple instances accessing the same database (only in multi-CPU environments)