
 
		
	- Forum
 
	- Databases
 
		
	- Oracle How can we know that the query are not using index
 
	
	
 
 
 
	
		
		
	
	
	
	
	
		
			
- 
	
	
		
		
			
				
				
				
					How can we know that the query are not using index
				
				
						
							
							
						
						
				
					
						
							Can tell me How can we know that the query are not using index, What is its solutions?
Question asked by visitor nitesh
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
			
			
				Expert Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					Re: How can we know that the query are not using index
				
				
						
						
				
					
						
							you can use "explain plan" command to get the execution plan for the query.
This execution plan is basically a step by step instruction for how the statement must be executed. That is, the order in which tables are read, if indexes are used, which join methods are used to join tables and so on.
This is the syntax 
explain plan for your-sql-statement;
If you do an EXPLAIN PLAN, Oracle will analyze the statement and fill a special table(PLAN_TABLE) with the Execution plan  for that statement. 
Hope this helps
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
		
			
				
				
				
					Re: How can we know that the query are not using index
				
				
						
						
							
						
				
					
						
							set autotrace to on
to use this feature u have to create a table called PLAN TABLE in the usser schema .
to create this table find and run a script named UTLXPLAN.SQL in oracle home directory.
..\oracle\product\10.2.0\db_1\rdbms\admin   
the location may differ from version tio version
next u need to enable PLUSTRACE role.
next everytime u execute any query ,after showing the result it will also show the execution plan that has been followed by oracle optimizer.
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
		
		
		
	
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				
				Posting Permissions
			
			
				
	
		- You may not post new threads
 
		- You may not post replies
 
		- You may not post attachments
 
		- You may not edit your posts
 
		-  
 
	
	
	Forum Rules