Run Rebuild Index Task daily on database but about 77 tables still highly fragmented over 80% !!!
Hello everyone
On our particular database server, we run the Rebuild Index Task (Using classic Maintenance Plan Designer) every night. Running the script below, I saw that about 77 tables had an avg_fragmentation_in_percentage between 80% and 99% !!
SELECT OBJECT_NAME(ind.OBJECT_ID) AS TableName,
ind.name AS IndexName, indexstats.index_type_desc AS IndexType,
indexstats.avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, NULL) indexstats
INNER JOIN sys.indexes ind
ON ind.object_id = indexstats.object_id
AND ind.index_id = indexstats.index_id
WHERE indexstats.avg_fragmentation_in_percent > 30--You can specify the percent as you want
ORDER BY indexstats.avg_fragmentation_in_percent DESC
I dont understand why these tables are highly fragmented after a daily index rebuild! Unless the users are doing heavy inserts/updates/deletes during the day.
Anyone has an idea of the possible causes of these results??
Thank you all in advance
Hallo Efyuzegeekgurl,
this is a normal behaviour when your table is only a small one. The reason for that behaviour is the following:
The dmv sys.dm_db_index_physical_stats counts each page which is not located at the very next one of the same table as a "fragment". If the first data page is 1700 and the second one is located on 1705 SQL server will count it as a fragment.
The basic allocation algorithm of Microsoft SQL Server is that new data pages will be created in "mixed extents". An extent is a contigious line of 8 consecutive data pages. This is for historical reasons when storage was expensive and data should
use as much as possible of allocated storage.
If a new table will be created the very first 8 pages are not located one after the other but "could" be located on different extents. If your table has only 9 data pages than 8 pages will count as "fragmented" because of their non consecutive
allocation. After 8 pages have been allocated Microsoft SQL Server will ALWAYS use a full extent for the next 8 pages (and so on!).
To understand this behaviour use the following example which creates a table with a record length of 8K. The next command will create 10 records (which means 10 data pages).
CREATE TABLE dbo.foo
Id INT NOT NULL IDENTITY (1, 1),
c1 CHAR(8000) NOT NULL DEFAULT ('filler')
GO
SET NOCOUNT ON;
GO
INSERT INTO dbo.foo DEFAULT VALUES
GO 10
When you check the page allocation you'll find the first 8 data pages not in a consecutive row but "scrambled" into different pages:
SELECT database_id,
index_id,
partition_id,
allocation_unit_type_desc,
extent_page_id,
allocated_page_page_id,
is_mixed_page_allocation,
page_type_desc
FROM sys.dm_db_database_page_allocations
DB_ID(),
OBJECT_ID('dbo.foo', 'U'),
0,
NULL,
'DETAILED'
) AS DDDPA
WHERE
DDDPA.is_allocated = 1
ORDER BY
DDDPA.is_iam_page DESC,
DDDPA.page_level DESC;
GO
You will see that the first 8 pages are located in a MIXED extent. Although the pages are in a consecutive order in the extent 221112 it is not guaranteed!
You can see from the very first three records that they are not in a consecutive row stored.
Now the fragmentation of the data seems to be quite high because we have 4 breaks in the rows. If we compare this value to the "fragmentation in sys.dm_db_index_physical_stats we will see at least the same result:
SELECT index_type_desc,
alloc_unit_type_desc,
DDIPS.avg_fragmentation_in_percent,
DDIPS.fragment_count,
DDIPS.page_count,
avg_page_space_used_in_percent
FROM sys.dm_db_index_physical_stats
DB_ID(),
OBJECT_ID('dbo.foo', 'U'),
NULL,
NULL,
'DETAILED'
) AS DDIPS;
So - just from my point of view - don't count only to the fragmentation in percent because if the table is to small it will ALWAYS be over 30%. Take more into account the density of the pages and - as all others have mentioned - the number of pages of the
index.
I would consider indexes with more or equal to 1.000 pages.
Another tip: Forget about the f... maintenance plans. These "plans" are not worth the time and money because you cannot control it in a more precise way. Have a look to the solution of Ola Hallengren and implement his solution - a great master
piece of index maintenance:
http://ola.hallengren.com
All the best to the community :)
MCM - SQL Server 2008
MCSE - SQL Server 2012
db Berater GmbH
SQL Server Blog (german only)
Similar Messages
-
Recommended frequency for running Rebuild Indexes Maintenance task on CAS
How frequently shall we run "Rebuild Index" maintenance task on CAS?
You should also consider using an actual SQL index rebuild script instead of the built-in maintenance task as described at http://stevethompsonmvp.wordpress.com/2013/05/07/optimizing-configmgr-databases/
Jason | http://blog.configmgrftw.com -
SSIS 2008 Rebuild Index Task increasing Log Size
I am testing SSIS 2008 Rebuild Index Task on a single database (db1). I shrank the
db1's log file to initial size. I also checked the box Sort results in tempdb on the SSIS package.
However, when I run the package, db1's log file size increased about 55 times the original size.
When I run a rebuild of all the index on db1
with (sort_in_tempdb=ON) ; there was only a slight increase in the log file size ( did not even double the initial size).
Is this a SSIS bug? The check box is not actually sorting in tempdb?I am testing SSIS 2008 Rebuild Index Task on a single database (db1). I shrank the
db1's log file to initial size. I also checked the box Sort results in tempdb on the SSIS package.
However, when I run the package, db1's log file size increased about 55 times the original size.
When I run a rebuild of all the index on db1
with (sort_in_tempdb=ON) ; there was only a slight increase in the log file size ( did not even double the initial size).
Is this a SSIS bug? The check box is not actually sorting in tempdb?
Arthur can you please move this thread in Database engine forum. IMO its what changed from 2008 .Index rebuild is fully logged from 2008 onwards it was previously (in 2005) minimally logged .Refer below link for information regarding same
http://support.microsoft.com/kb/2407439/en-gb
Now about when sort intempdb is used.The intermediate sort results that are used to build the index are stored in tempdb .When you rebuild without sort_in_tempdb ( i guess your data and log file are on same drive) index will utilize disk space on which it
resides so it might seem to you log has increased.Is it so ,am i correct.
What query you used to measure log file size,are you absolutely sure it was log file that increased
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Rebuilding indexes on a replicated database
Hello there,
I am planning to rebuild the highly-fragmented indexes on my db which has both transaction and merge replications on many of its tables in addition to a number of indexed views. Fragmentation percent is almost the same on both servers, so my question is:
can I rebuild the indexes on both the publisher and subscriber manually without the need to recreate all these replications taking into account that almost all the indexes are on the primary keys of the replicated tables. My first thought was to rebuild the
indexes on either server, take a copy of the database and recreate all the replications. This is a long process and will take almost 18 hours.
Any ideas?
Thanks in advance
Ghada M.AhmadThis is the MDT Forum, seems like you are looking for help on SQL - post here -
http://social.technet.microsoft.com/Forums/sqlserver/en-US/home
Regards, Vik Singh "If this thread answered your question, please click on "Mark as Answer" -
Updated to 10.10 but ABOUT screen still shows 10.9
I thought I updated to Yosemite 10.10.2, the update downloads, installs, and the machine reboots but when I check the OS version in the ABOUT window I see 10.9.5, did the OS update or not?
Duh! Posting the screen showing it did not update is exactly the point I was trying to make.
The questions seem to me to be is... 1) HOW can I download the update a file of over 5 gigs, 2) Have the system tell me it installed the update and... after the update is completed and BECAUSE it updated, 3) the machine reboots BECAUSE it thinks it UPDATED, but, and this is a big BUT, 4) the new screens and the ABOUT screen (and the OS) does NOT, repeat, DOES NOT, show that the system's OS really did update to the new version? This makes no sense!
So does anyone know... How can I do all of the right actions and get most of the right messages and have the OS NOT, repeat NOT update to 10.10.2? I have checked the software version using the UNAME -RSV (all lower case) and I get "Darwin 13.4.0 Darwin Kernel Version 13.4.0: Wed Dec 17 19:05:52 PST 2014; root:xnu-2422.115.10~1/RELEASE_X86_64", something that makes no sense to me with the OS supposedly being Yosemite 10.10.2 (although I am willing to concede that these two result will not, necessarily, match 100%) but... they should match SOME!
On the surface, this software update process appears to have bush league kind of performance with respect to code updates (i.e. it is a commercial package but it really does not appear to work!) but... from what I can tell from the data, the system did NOT update and I can not get it to work correctly. Also, what I can tell, there is nothing to do in the update process besides starting the update and letting it run its course, yet... I get non-sensical results.
So, does anyone know how or what I have to do, or could possibly have done wrong, to get this sort of non-sensical update result?
Thanks. -
Multiple Usage unchecked but shadow table still updated with IUUC_PROCESSED = 0
Hello,
We changed several MT_IDs by unchecking the Multiple Usage checkbox:
The OLI functions have been redesigned correctly and all Run Time Objects also. The IUUC_PROCESSED field is now conditioned to empty in the Abap statements:
*** get records from logging table
SELECT * FROM /1CADMC/00001360 CLIENT SPECIFIED
INTO TABLE _IT_IO_S_/1CADMC/00001360 UP TO I_NUM_OF_RECORDS ROWS
WHERE (_WC_S_/1CADMC/00001360)
AND IUUC_PROCESSED = ' '
ORDER BY
IUUC_PROCESSED
TABNAME
VARKEY
IUUC_SEQUENCE
%_HINTS MSSQLNT 'TABLE &TABLE& abindex(IUC), READCOMMITTED,READPAST'.
However the records in the table are still updated with IUUC_PROCESSED equals to 0:
We use DB6 09.07.0005 and ECC 6.0 with DMIS 2011_1_731 0004 SAPK-11604INDMIS DMIS 2011_1.
Any idea?
Regards,
LaurentI have the "techie" answer for all of you. According to the tier 2 support at Norton Help Desk, the latest live update from Norton "utilizes Visual Studio 2012 which enables SSE2 instructions" and my processor can not handle that.
He said they are "working on a solution" and offered to reply back on Wednesday / Thursday this week if a solution could be found... -
Issue in rebuilding index after restoring database from sql server 2005 to 2012
Hi All,
We have recently restored a database named DBA_admin from our sql server 2005 instance to sql server 2012 and we have added the database to out weekly maintenance plan. After adding the database to maintenance plan the job is failing every weekend due to
below error message.
Error message from maintenance plan history:
Executing the query "ALTER INDEX [PK_lsttype] ON [dbo].[lstAssign..." failed with the following error: "Invalid object name 'admin.dbo.databaselog'.
ALTER_INDEX - dbo.PK_lsttype". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Below is the code within the maintenance plan which the rebuild index task is using for database dba_admin:
USE [dba_admin]
GO
ALTER INDEX [PK_lstType] ON [dbo].[lstType] REBUILD PARTITION = ALL WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 98, DATA_COMPRESSION = PAGE)
Please let me know if any one knows how to fix this issue.
Thanks in Advance.Sorry for the confusion.
Here is what is happening.
The query is failing while trying to rebuild index [Pk_lsttype] on table [lstAssign], both these objects belong to database
admin.
I have verified the old instance there is table databaselog within the database
dba_admin, but in new SQL instance within the database dba_admin the table is not present.
Even I'm not sure of what this table databaselog has to do with rebuilding indexes on table
lstAssign within the admin database.
I have manually tried to execute the alter index command within the database
admin and it is failing with the below error.
ALTER_TABLE - dbo.Query_pnb_sms
Msg 208, Level 16, State 1, Procedure ddlDatabaseTriggerLog, Line 39
Invalid object name 'dba_admin.dbo.databaselog'. -
SCCM database Modified date doesn't change / rebuild indexes
Hi all,
I have 2 questions
1)
We have a month ago upgraded our SCCM environment from SCCM 2012 RTM -> SCCM 2012 SP1 (no CU), and we have upgraded SQL 2008 R2 (CU6) to SQL 2008 R2 SP2.
We have a SCCM 2012 primary site and an SCCM 2012 CAS site from both these sites its database file has not changed its modified date since the data of upgrade (SQL is installed on the same server so the database is local). However the WSUS database and the
reporting DB that exist on the same server updates its modified date.
SCCM is running and all status messages are OK. All component status's are updating and have correct dates based on when e.g. the last backup ran (that is at 6 pm every night) with no errors. To make a long story short, everything works
as it should. Deployments and advertisements and OSD arrive, collections get updated, no errors appear in the log files or in the component or site status, but the database on these servers (CAS and Primary) does not modify its date. SCCM backup of these servers
is running and the database file in that backup also contains the same modified date.
Anyone knows why this happens , or do we have an issue ?
2)
Maintenance task rebuild indexes
Is there a best practice according to the maintenance task rebuild indexes?
In our environment we have not enabled this maintenance task, both sites run for over one year.
Can we enable this task without disturbing or is it a better idea to enable this task in the weekend when there is less workload , and afterwards schedule this task once a week
regards and thx in advance
JohanAs stated “The time stamp will also change if the database files size are expanded as well when the database grow”
does that mean that after our upgrade a month ago the database has not grown with new data??
It depends. Data might have been added to the database (which it was fur sure with ConfigMgr), but the timestamp will only change if the file size was increased too. That has something to do with the initial and max file size settings in SQL and the autogrowth
settings.
Torsten Meringer | http://www.mssccmfaq.de -
Sql Query is running fine in one database but running from long in other
Hi All,
Please advice me on below:
One query is running fine on 11gr2 database with having 2GB SGA and cost of the running query is 15, but the same query is running from long time in other database having same 2GB SGA.
Below is teh Query:
SELECT CDU.USER_NAME, DECODE(:B2 , 'QUEUE','begin
dbms_aqadm.grant_queue_privilege(''ALL'','''||:B1
||''','''||CDU.USER_NAME||''',true); end;', 'grant '||DECODE(:B2 ,
'TABLE','SELECT,INSERT,UPDATE,DELETE'||DECODE(CDU.ADMIN,'Y',',REFERENCES
',''), 'VIEW',DECODE(:B3 ,NULL,'SELECT','SELECT,INSERT,UPDATE,DELETE'||D
ECODE(CDU.ADMIN,'Y',',REFERENCES','')), 'TYPE','EXECUTE',
'SEQUENCE','SELECT', 'EXECUTE')||' on
'||PACK_UTILS.GET_SCHEMA_OWNER||'.'||:B1 ||' to
"'||CDU.USER_NAME||'"'||DECODE(CDU.ADMIN,'Y',' WITH GRANT OPTION',''))
AS GRANT_SOURCE, 'create or replace synonym
"'||CDU.USER_NAME||'"."'||:B1 ||'" for
"'||PACK_UTILS.GET_SCHEMA_OWNER||'"."'||:B1 ||'"' AS SYNONYM_SOURCE,
NVL2( S.TABLE_NAME, 'Y', 'N' ) SYNONYM_EXISTS FROM CD_USERS CDU,
ALL_SYNONYMS S, ALL_USERS U WHERE :B2 IN
('TYPE','TABLE','VIEW','FUNCTION','PROCEDURE','PACKAGE','SEQUENCE','QUEU
E','SYNONYM') AND CDU.USER_TYPE = 'S' AND CDU.USER_NAME = U.USERNAME
AND CDU.USER_NAME = S.OWNER AND :B1 = S.TABLE_NAME
Please advise me as application team is chasing me like anything. what I can find out is that Cost is different in both databases.Sorry forr Late reply friends..
below are the Explian plans for both databases:
BAD database
PLAN_TABLE_OUTPUT
SQL_ID 3bp3rynsds42r, child number 0
SELECT CDU.USER_NAME, DECODE(:B2 , 'QUEUE','begin
dbms_aqadm.grant_queue_privilege(''ALL'','''||:B1
||''','''||CDU.USER_NAME||''',true); end;', 'grant '||DECODE(:B2 ,
'TABLE','SELECT,INSERT,UPDATE,DELETE'||DECODE(CDU.ADMIN,'Y',',REFERENCES
',''), 'VIEW',DECODE(:B3 ,NULL,'SELECT','SELECT,INSERT,UPDATE,DELETE'||D
ECODE(CDU.ADMIN,'Y',',REFERENCES','')), 'TYPE','EXECUTE',
'SEQUENCE','SELECT', 'EXECUTE')||' on
'||PACK_UTILS.GET_SCHEMA_OWNER||'.'||:B1 ||' to
"'||CDU.USER_NAME||'"'||DECODE(CDU.ADMIN,'Y',' WITH GRANT OPTION',''))
PLAN_TABLE_OUTPUT
AS GRANT_SOURCE, 'create or replace synonym
"'||CDU.USER_NAME||'"."'||:B1 ||'" for
"'||PACK_UTILS.GET_SCHEMA_OWNER||'"."'||:B1 ||'"' AS SYNONYM_SOURCE,
NVL2( S.TABLE_NAME, 'Y', 'N' ) SYNONYM_EXISTS FROM CD_USERS CDU,
ALL_SYNONYMS S, ALL_USERS U WHERE :B2 IN
('TYPE','TABLE','VIEW','FUNCTION','PROCEDURE','PACKAGE','SEQUENCE','QUEU
E','SYNONYM') AND CDU.USER_TYPE = 'S' AND CDU.USER_NAME = U.USERNAME
AND CDU.USER_NAME = S.OWNER AND :B1 = S.TABLE_NAME
Plan hash value: 2404940060
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | | 94 (100)| |
|* 1 | FILTER | | | | | | |
|* 2 | HASH JOIN | | 81 | 6723 | | 94 (0)| 00:00:01 |
| 3 | NESTED LOOPS OUTER | | 81 | 6480 | | 91 (0)| 00:00:01 |
|* 4 | HASH JOIN | | 81 | 3726 | | 10 (0)| 00:00:01 |
|* 5 | HASH JOIN | | 137 | 3699 | | 7 (0)| 00:00:01 |
| 6 | TABLE ACCESS FULL | TS$ | 7 | 21 | | 3 (0)| 00:00:01 |
|* 7 | TABLE ACCESS FULL | USER$ | 137 | 3288 | | 4 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 8 | TABLE ACCESS FULL | CD_USERS | 82 | 1558 | | 3 (0)| 00:00:01 |
| 9 | VIEW | ALL_SYNONYMS | 1 | 34 | | 1 (0)| 00:00:01 |
| 10 | SORT UNIQUE | | | | | | |
| 11 | UNION-ALL PARTITION | | | | | | |
|* 12 | FILTER | | | | | | |
| 13 | NESTED LOOPS | | 1 | 116 | | 60 (0)| 00:00:01 |
| 14 | NESTED LOOPS | | 1 | 94 | | 59 (0)| 00:00:01 |
| 15 | NESTED LOOPS | | 12 | 684 | | 23 (0)| 00:00:01 |
| 16 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
|* 17 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
| 18 | TABLE ACCESS BY INDEX ROWID | SYN$ | 12 | 456 | | 22 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 19 | INDEX SKIP SCAN | I_SYN2 | 12 | | | 12 (0)| 00:00:01 |
|* 20 | TABLE ACCESS BY INDEX ROWID | OBJ$ | 1 | 37 | | 3 (0)| 00:00:01 |
|* 21 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 2 (0)| 00:00:01 |
|* 22 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
|* 23 | FIXED TABLE FULL | X$KZSPR | 17 | 119 | | 0 (0)| |
|* 24 | FILTER | | | | | | |
|* 25 | FILTER | | | | | | |
| 26 | NESTED LOOPS | | 27 | 2430 | | 6 (0)| 00:00:01 |
| 27 | NESTED LOOPS | | 1 | 78 | | 4 (0)| 00:00:01 |
| 28 | NESTED LOOPS | | 1 | 56 | | 3 (0)| 00:00:01 |
| 29 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 30 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
|* 31 | INDEX RANGE SCAN | I_OBJ5 | 1 | 37 | | 2 (0)| 00:00:01 |
|* 32 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
|* 33 | INDEX RANGE SCAN | I_OBJAUTH1 | 28 | 336 | | 2 (0)| 00:00:01 |
|* 34 | FIXED TABLE FULL | X$KZSRO | 1 | 3 | | 0 (0)| |
| 35 | NESTED LOOPS | | 1 | 30 | | 3 (0)| 00:00:01 |
|* 36 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 37 | INDEX RANGE SCAN | I_OBJ4 | 1 | 10 | | 2 (0)| 00:00:01 |
| 38 | NESTED LOOPS | | 1 | 30 | | 3 (0)| 00:00:01 |
|* 39 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 40 | INDEX RANGE SCAN | I_OBJ4 | 1 | 10 | | 2 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 41 | FILTER | | | | | | |
| 42 | NESTED LOOPS | | 1 | 129 | | 4301 (2)| 00:00:39 |
| 43 | NESTED LOOPS | | 1 | 129 | | 4301 (2)| 00:00:39 |
| 44 | NESTED LOOPS | | 1 | 91 | | 4299 (2)| 00:00:39 |
| 45 | NESTED LOOPS | | 1 | 69 | | 4298 (2)| 00:00:39 |
| 46 | NESTED LOOPS | | 2 | 64 | | 4292 (2)| 00:00:39 |
| 47 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
|* 48 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
| 49 | VIEW | _ALL_SYNONYMS_TREE | 2 | 26 | | 4291 (2)| 00:00:39 |
|* 50 | CONNECT BY NO FILTERING WITH START-WITH| | | | | | |
|* 51 | FILTER | | | | | | |
PLAN_TABLE_OUTPUT
|* 52 | HASH JOIN | | 18370 | 2080K| | 4291 (2)| 00:00:39 |
| 53 | INDEX FULL SCAN | I_USER2 | 207 | 4554 | | 1 (0)| 00:00:01 |
|* 54 | HASH JOIN | | 18370 | 1686K| | 4290 (2)| 00:00:39 |
| 55 | TABLE ACCESS FULL | USER$ | 207 | 3933 | | 4 (0)| 00:00:01 |
|* 56 | HASH JOIN | | 2922K| 209M| 18M| 4269 (1)| 00:00:39 |
|* 57 | INDEX FAST FULL SCAN | I_OBJ2 | 387K| 13M| | 1323 (1)| 00:00:12 |
| 58 | TABLE ACCESS FULL | SYN$ | 400K| 14M| | 566 (2)| 00:00:06 |
| 59 | NESTED LOOPS | | 1 | 30 | | 3 (0)| 00:00:01 |
|* 60 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 61 | INDEX RANGE SCAN | I_OBJ4 | 1 | 10 | | 2 (0)| 00:00:01 |
|* 62 | FILTER | | | | | | |
PLAN_TABLE_OUTPUT
| 63 | TABLE ACCESS BY INDEX ROWID | SYN$ | 1 | 38 | | 3 (0)| 00:00:01 |
|* 64 | INDEX UNIQUE SCAN | I_SYN1 | 1 | | | 2 (0)| 00:00:01 |
|* 65 | FILTER | | | | | | |
|* 66 | FILTER | | | | | | |
| 67 | NESTED LOOPS | | 27 | 2430 | | 6 (0)| 00:00:01 |
| 68 | NESTED LOOPS | | 1 | 78 | | 4 (0)| 00:00:01 |
| 69 | NESTED LOOPS | | 1 | 56 | | 3 (0)| 00:00:01 |
| 70 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
|* 71 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
|* 72 | INDEX RANGE SCAN | I_OBJ5 | 1 | 37 | | 2 (0)| 00:00:01 |
|* 73 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 74 | INDEX RANGE SCAN | I_OBJAUTH1 | 28 | 336 | | 2 (0)| 00:00:01 |
|* 75 | FIXED TABLE FULL | X$KZSRO | 1 | 3 | | 0 (0)| |
| 76 | NESTED LOOPS | | 1 | 30 | | 3 (0)| 00:00:01 |
|* 77 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 78 | INDEX RANGE SCAN | I_OBJ4 | 1 | 10 | | 2 (0)| 00:00:01 |
|* 79 | FIXED TABLE FULL | X$KZSPR | 17 | 119 | | 0 (0)| |
|* 80 | TABLE ACCESS BY INDEX ROWID | OBJ$ | 1 | 37 | | 3 (0)| 00:00:01 |
|* 81 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 2 (0)| 00:00:01 |
|* 82 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
|* 83 | INDEX UNIQUE SCAN | I_SYN1 | 1 | | | 1 (0)| 00:00:01 |
|* 84 | TABLE ACCESS BY INDEX ROWID | SYN$ | 1 | 38 | | 2 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
| 85 | NESTED LOOPS | | 1 | 30 | | 3 (0)| 00:00:01 |
|* 86 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 87 | INDEX RANGE SCAN | I_OBJ4 | 1 | 10 | | 2 (0)| 00:00:01 |
| 88 | TABLE ACCESS FULL | TS$ | 7 | 21 | | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter((:B2='TYPE' OR :B2='TABLE' OR :B2='VIEW' OR :B2='FUNCTION' OR :B2='PROCEDURE' OR :B2='PACKAGE' OR
:B2='SEQUENCE' OR :B2='QUEUE' OR :B2='SYNONYM'))
PLAN_TABLE_OUTPUT
2 - access("U"."TEMPTS#"="TTS"."TS#")
4 - access("CDU"."USER_NAME"="U"."NAME")
5 - access("U"."DATATS#"="DTS"."TS#")
7 - filter("U"."TYPE#"=1)
8 - filter("CDU"."USER_TYPE"='S')
12 - filter(((INTERNAL_FUNCTION("O"."SPARE3") OR ("S"."NODE" IS NULL AND IS NOT NULL) OR IS NOT NULL) AND
(("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>10 AND
"O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND
"O"."TYPE#"<>88) OR BITAND("U"."SPARE1",16)=0 OR (SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND
"U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT
NULL)))
PLAN_TABLE_OUTPUT
17 - access("U"."NAME"="CDU"."USER_NAME")
19 - access("S"."NAME"=:B1)
filter("S"."NAME"=:B1)
20 - filter("O"."SPARE3"="U"."USER#")
21 - access("O"."OBJ#"="S"."OBJ#" AND "O"."TYPE#"=5)
filter("O"."TYPE#"=5)
22 - access("O"."OWNER#"="U"."USER#")
23 - filter((((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR
(-"KZSPRPRV")=(-50)) AND "INST_ID"=USERENV('INSTANCE')))
24 - filter((("BA"."GRANTOR#"=USERENV('SCHEMAID') OR IS NOT NULL) AND (("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND
"O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND
PLAN_TABLE_OUTPUT
"O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR
BITAND("U"."SPARE1",16)=0 OR (INTERNAL_FUNCTION("O"."TYPE#") AND
((SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL)))))
25 - filter(:B1 IS NULL)
30 - access("BU"."NAME"=:B1)
31 - access("BU"."USER#"="O"."SPARE3" AND "O"."NAME"=:B1)
32 - access("O"."OWNER#"="U"."USER#")
33 - access("BA"."OBJ#"="O"."OBJ#")
34 - filter("KZSROROL"=:B1)
36 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
PLAN_TABLE_OUTPUT
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
37 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
39 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
40 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
41 - filter((("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND
"O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND
"O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR BITAND("U"."SPARE1",16)=0 OR
(SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL))
48 - access("U"."NAME"="CDU"."USER_NAME")
PLAN_TABLE_OUTPUT
50 - access("S"."BASE_SYN_ID"=PRIOR NULL)
filter( IS NOT NULL)
51 - filter((("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND
"O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND
"O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR BITAND("U"."SPARE1",16)=0 OR
(SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL))
52 - access("O"."OWNER#"="U"."USER#")
54 - access("S"."OWNER"="BU"."NAME" AND "BU"."USER#"="O"."SPARE3")
56 - access("S"."NAME"="O"."NAME")
57 - filter("O"."TYPE#"=5)
PLAN_TABLE_OUTPUT
60 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
61 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
62 - filter(( IS NOT NULL OR ("S"."NODE" IS NULL AND IS NOT NULL)))
64 - access("S"."OBJ#"=:B1)
65 - filter((("BA"."GRANTOR#"=USERENV('SCHEMAID') OR IS NOT NULL) AND (("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND
"O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND
"O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR
BITAND("U"."SPARE1",16)=0 OR (INTERNAL_FUNCTION("O"."TYPE#") AND
((SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL)))))
PLAN_TABLE_OUTPUT
66 - filter(:B1 IS NULL)
71 - access("BU"."NAME"=:B1)
72 - access("BU"."USER#"="O"."SPARE3" AND "O"."NAME"=:B1)
73 - access("O"."OWNER#"="U"."USER#")
74 - access("BA"."OBJ#"="O"."OBJ#")
75 - filter("KZSROROL"=:B1)
77 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
78 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
79 - filter((((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR
(-"KZSPRPRV")=(-50)) AND "INST_ID"=USERENV('INSTANCE')))
PLAN_TABLE_OUTPUT
80 - filter("O"."SPARE3"="U"."USER#")
81 - access("O"."OBJ#"="ST"."SYN_ID" AND "O"."TYPE#"=5)
filter("O"."TYPE#"=5)
82 - access("O"."OWNER#"="U"."USER#")
83 - access("S"."OBJ#"="ST"."SYN_ID")
filter("O"."OBJ#"="S"."OBJ#")
84 - filter("S"."NAME"=:B1)
86 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
87 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
209 rows selected
==============================================================================================
Good one
PLAN_TABLE_OUTPUT
SQL_ID 3bp3rynsds42r, child number 0
SELECT CDU.USER_NAME, DECODE(:B2 , 'QUEUE','begin
dbms_aqadm.grant_queue_privilege(''ALL'','''||:B1
||''','''||CDU.USER_NAME||''',true); end;', 'grant '||DECODE(:B2 ,
'TABLE','SELECT,INSERT,UPDATE,DELETE'||DECODE(CDU.ADMIN,'Y',',REFERENCES
',''), 'VIEW',DECODE(:B3 ,NULL,'SELECT','SELECT,INSERT,UPDATE,DELETE'||D
ECODE(CDU.ADMIN,'Y',',REFERENCES','')), 'TYPE','EXECUTE',
'SEQUENCE','SELECT', 'EXECUTE')||' on
'||PACK_UTILS.GET_SCHEMA_OWNER||'.'||:B1 ||' to
"'||CDU.USER_NAME||'"'||DECODE(CDU.ADMIN,'Y',' WITH GRANT OPTION',''))
PLAN_TABLE_OUTPUT
AS GRANT_SOURCE, 'create or replace synonym
"'||CDU.USER_NAME||'"."'||:B1 ||'" for
"'||PACK_UTILS.GET_SCHEMA_OWNER||'"."'||:B1 ||'"' AS SYNONYM_SOURCE,
NVL2( S.TABLE_NAME, 'Y', 'N' ) SYNONYM_EXISTS FROM CD_USERS CDU,
ALL_SYNONYMS S, ALL_USERS U WHERE :B2 IN
('TYPE','TABLE','VIEW','FUNCTION','PROCEDURE','PACKAGE','SEQUENCE','QUEU
E','SYNONYM') AND CDU.USER_TYPE = 'S' AND CDU.USER_NAME = U.USERNAME
AND CDU.USER_NAME = S.OWNER AND :B1 = S.TABLE_NAME
Plan hash value: 2146531909
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | | 15 (100)| |
|* 1 | FILTER | | | | | | |
| 2 | NESTED LOOPS OUTER | | 3 | 273 | | 15 (0)| 00:00:01 |
| 3 | NESTED LOOPS | | 3 | 153 | | 12 (0)| 00:00:01 |
| 4 | NESTED LOOPS | | 3 | 144 | | 9 (0)| 00:00:01 |
| 5 | NESTED LOOPS | | 3 | 135 | | 6 (0)| 00:00:01 |
|* 6 | TABLE ACCESS FULL | USER$ | 55 | 1375 | | 4 (0)| 00:00:01 |
|* 7 | TABLE ACCESS BY INDEX ROWID | CD_USERS | 1 | 20 | | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 8 | INDEX UNIQUE SCAN | I1_CD_USERS | 1 | | | 0 (0)| |
| 9 | TABLE ACCESS CLUSTER | TS$ | 1 | 3 | | 1 (0)| 00:00:01 |
|* 10 | INDEX UNIQUE SCAN | I_TS# | 1 | | | 0 (0)| |
| 11 | TABLE ACCESS CLUSTER | TS$ | 1 | 3 | | 1 (0)| 00:00:01 |
|* 12 | INDEX UNIQUE SCAN | I_TS# | 1 | | | 0 (0)| |
| 13 | VIEW | ALL_SYNONYMS | 1 | 40 | | 1 (0)| 00:00:01 |
| 14 | SORT UNIQUE | | | | | | |
| 15 | UNION-ALL PARTITION | | | | | | |
|* 16 | FILTER | | | | | | |
| 17 | NESTED LOOPS | | 1 | 116 | | 19 (0)| 00:00:01 |
| 18 | NESTED LOOPS | | 1 | 94 | | 18 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
| 19 | NESTED LOOPS | | 1 | 56 | | 15 (0)| 00:00:01 |
| 20 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 20 | | 1 (0)| 00:00:01 |
|* 21 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
| 22 | TABLE ACCESS BY INDEX ROWID | SYN$ | 1 | 36 | | 14 (0)| 00:00:01 |
|* 23 | INDEX SKIP SCAN | I_SYN2 | 1 | | | 12 (0)| 00:00:01 |
|* 24 | TABLE ACCESS BY INDEX ROWID | OBJ$ | 1 | 38 | | 3 (0)| 00:00:01 |
|* 25 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 2 (0)| 00:00:01 |
|* 26 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
|* 27 | FIXED TABLE FULL | X$KZSPR | 17 | 119 | | 0 (0)| |
|* 28 | FILTER | | | | | | |
|* 29 | FILTER | | | | | | |
PLAN_TABLE_OUTPUT
| 30 | NESTED LOOPS | | 3 | 279 | | 5 (0)| 00:00:01 |
| 31 | NESTED LOOPS | | 1 | 80 | | 4 (0)| 00:00:01 |
| 32 | NESTED LOOPS | | 1 | 58 | | 3 (0)| 00:00:01 |
| 33 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 20 | | 1 (0)| 00:00:01 |
|* 34 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
|* 35 | INDEX RANGE SCAN | I_OBJ5 | 1 | 38 | | 2 (0)| 00:00:01 |
|* 36 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
|* 37 | INDEX RANGE SCAN | I_OBJAUTH1 | 3 | 39 | | 1 (0)| 00:00:01 |
|* 38 | FIXED TABLE FULL | X$KZSRO | 1 | 3 | | 0 (0)| |
| 39 | NESTED LOOPS | | 1 | 32 | | 3 (0)| 00:00:01 |
|* 40 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 41 | INDEX RANGE SCAN | I_OBJ4 | 1 | 12 | | 2 (0)| 00:00:01 |
| 42 | NESTED LOOPS | | 1 | 32 | | 3 (0)| 00:00:01 |
|* 43 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 44 | INDEX RANGE SCAN | I_OBJ4 | 1 | 12 | | 2 (0)| 00:00:01 |
|* 45 | FILTER | | | | | | |
| 46 | NESTED LOOPS | | 1 | 129 | | 1065 (1)| 00:00:13 |
| 47 | NESTED LOOPS | | 1 | 107 | | 1064 (1)| 00:00:13 |
| 48 | NESTED LOOPS | | 1 | 69 | | 1061 (1)| 00:00:13 |
| 49 | NESTED LOOPS | | 2 | 66 | | 1059 (1)| 00:00:13 |
| 50 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 20 | | 1 (0)| 00:00:01 |
|* 51 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
PLAN_TABLE_OUTPUT
| 52 | VIEW | _ALL_SYNONYMS_TREE | 2 | 26 | | 1058 (1)| 00:00:13 |
|* 53 | CONNECT BY NO FILTERING WITH START-WITH| | | | | | |
|* 54 | FILTER | | | | | | |
|* 55 | HASH JOIN | | 705 | 81780 | | 1058 (1)| 00:00:13 |
| 56 | INDEX FULL SCAN | I_USER2 | 124 | 2728 | | 1 (0)| 00:00:01 |
|* 57 | HASH JOIN | | 705 | 66270 | | 1057 (1)| 00:00:13 |
| 58 | TABLE ACCESS FULL | USER$ | 124 | 2480 | | 4 (0)| 00:00:01 |
|* 59 | HASH JOIN | | 66964 | 4839K| 2232K| 1052 (1)| 00:00:13 |
| 60 | TABLE ACCESS FULL | SYN$ | 47615 | 1673K| | 78 (2)| 00:00:01 |
|* 61 | INDEX FAST FULL SCAN | I_OBJ5 | 47862 | 1776K| | 752 (1)| 00:00:10 |
| 62 | NESTED LOOPS | | 1 | 32 | | 3 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 63 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 64 | INDEX RANGE SCAN | I_OBJ4 | 1 | 12 | | 2 (0)| 00:00:01 |
|* 65 | FILTER | | | | | | |
| 66 | TABLE ACCESS BY INDEX ROWID | SYN$ | 1 | 36 | | 2 (0)| 00:00:01 |
|* 67 | INDEX UNIQUE SCAN | I_SYN1 | 1 | | | 1 (0)| 00:00:01 |
|* 68 | FILTER | | | | | | |
|* 69 | FILTER | | | | | | |
| 70 | NESTED LOOPS | | 3 | 279 | | 5 (0)| 00:00:01 |
| 71 | NESTED LOOPS | | 1 | 80 | | 4 (0)| 00:00:01 |
| 72 | NESTED LOOPS | | 1 | 58 | | 3 (0)| 00:00:01 |
| 73 | TABLE ACCESS BY INDEX ROWID | USER$ | 1 | 20 | | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 74 | INDEX UNIQUE SCAN | I_USER1 | 1 | | | 0 (0)| |
|* 75 | INDEX RANGE SCAN | I_OBJ5 | 1 | 38 | | 2 (0)| 00:00:01 |
|* 76 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
|* 77 | INDEX RANGE SCAN | I_OBJAUTH1 | 3 | 39 | | 1 (0)| 00:00:01 |
|* 78 | FIXED TABLE FULL | X$KZSRO | 1 | 3 | | 0 (0)| |
| 79 | NESTED LOOPS | | 1 | 32 | | 3 (0)| 00:00:01 |
|* 80 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 81 | INDEX RANGE SCAN | I_OBJ4 | 1 | 12 | | 2 (0)| 00:00:01 |
|* 82 | FIXED TABLE FULL | X$KZSPR | 17 | 119 | | 0 (0)| |
|* 83 | TABLE ACCESS BY INDEX ROWID | SYN$ | 1 | 36 | | 1 (0)| 00:00:01 |
|* 84 | INDEX UNIQUE SCAN | I_SYN1 | 1 | | | 0 (0)| |
PLAN_TABLE_OUTPUT
|* 85 | TABLE ACCESS BY INDEX ROWID | OBJ$ | 1 | 38 | | 3 (0)| 00:00:01 |
|* 86 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 2 (0)| 00:00:01 |
|* 87 | INDEX RANGE SCAN | I_USER2 | 1 | 22 | | 1 (0)| 00:00:01 |
| 88 | NESTED LOOPS | | 1 | 32 | | 3 (0)| 00:00:01 |
|* 89 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 90 | INDEX RANGE SCAN | I_OBJ4 | 1 | 12 | | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
PLAN_TABLE_OUTPUT
1 - filter((:B2='TYPE' OR :B2='TABLE' OR :B2='VIEW' OR :B2='FUNCTION' OR :B2='PROCEDURE' OR :B2='PACKAGE' OR
:B2='SEQUENCE' OR :B2='QUEUE' OR :B2='SYNONYM'))
6 - filter("U"."TYPE#"=1)
7 - filter("CDU"."USER_TYPE"='S')
8 - access("CDU"."USER_NAME"="U"."NAME")
10 - access("U"."DATATS#"="DTS"."TS#")
12 - access("U"."TEMPTS#"="TTS"."TS#")
16 - filter(((INTERNAL_FUNCTION("O"."SPARE3") OR ("S"."NODE" IS NULL AND IS NOT NULL) OR IS NOT NULL) AND
(("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>10 AND
"O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND
"O"."TYPE#"<>88) OR BITAND("U"."SPARE1",16)=0 OR (SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND
PLAN_TABLE_OUTPUT
"U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT
NULL)))
21 - access("U"."NAME"="CDU"."USER_NAME")
23 - access("S"."NAME"=:B1)
filter("S"."NAME"=:B1)
24 - filter("O"."SPARE3"="U"."USER#")
25 - access("O"."OBJ#"="S"."OBJ#" AND "O"."TYPE#"=5)
filter("O"."TYPE#"=5)
26 - access("O"."OWNER#"="U"."USER#")
27 - filter((((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR
(-"KZSPRPRV")=(-50)) AND "INST_ID"=USERENV('INSTANCE')))
PLAN_TABLE_OUTPUT
28 - filter((("BA"."GRANTOR#"=USERENV('SCHEMAID') OR IS NOT NULL) AND (("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND
"O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND
"O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR
BITAND("U"."SPARE1",16)=0 OR (INTERNAL_FUNCTION("O"."TYPE#") AND
((SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL)))))
29 - filter(:B1 IS NULL)
34 - access("BU"."NAME"=:B1)
35 - access("BU"."USER#"="O"."SPARE3" AND "O"."NAME"=:B1)
36 - access("O"."OWNER#"="U"."USER#")
37 - access("BA"."OBJ#"="O"."OBJ#")
PLAN_TABLE_OUTPUT
38 - filter("KZSROROL"=:B1)
40 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
41 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
43 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
44 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
45 - filter((("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND
"O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND
"O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR BITAND("U"."SPARE1",16)=0 OR
(SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
PLAN_TABLE_OUTPUT
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL))
51 - access("U"."NAME"="CDU"."USER_NAME")
53 - access("S"."BASE_SYN_ID"=PRIOR NULL)
filter( IS NOT NULL)
54 - filter((("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND
"O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND
"O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR BITAND("U"."SPARE1",16)=0 OR
(SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL))
55 - access("O"."OWNER#"="U"."USER#")
57 - access("S"."OWNER"="BU"."NAME" AND "BU"."USER#"="O"."SPARE3")
PLAN_TABLE_OUTPUT
59 - access("S"."NAME"="O"."NAME")
61 - filter("O"."TYPE#"=5)
63 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
64 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
65 - filter(( IS NOT NULL OR ("S"."NODE" IS NULL AND IS NOT NULL)))
67 - access("S"."OBJ#"=:B1)
68 - filter((("BA"."GRANTOR#"=USERENV('SCHEMAID') OR IS NOT NULL) AND (("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND
"O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>10 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND
"O"."TYPE#"<>13 AND "O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88) OR
BITAND("U"."SPARE1",16)=0 OR (INTERNAL_FUNCTION("O"."TYPE#") AND
PLAN_TABLE_OUTPUT
((SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2) OR ("U"."TYPE#"=2 AND
"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR IS NOT NULL)))))
69 - filter(:B1 IS NULL)
74 - access("BU"."NAME"=:B1)
75 - access("BU"."USER#"="O"."SPARE3" AND "O"."NAME"=:B1)
76 - access("O"."OWNER#"="U"."USER#")
77 - access("BA"."OBJ#"="O"."OBJ#")
78 - filter("KZSROROL"=:B1)
80 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))
81 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TY -
Iphoto won't display photos or run a slideshow - just a black screen. Can't see photos to edit etc. Thumbnails all OK and all else seems visible in the usual way etc. Tried rebuilding library and reset Mac Air but no result. Ideas please!!!!
and was told to go home and rebuild the photo library (there are 2257 photos). Did this but problem is still there.
When you rebuild the library did you rebuild the database? Also did you repair the library's permissions? Is this the First Aid window that you got?
Those are the two options to use.
Here's another fix you can try:
Using iPhoto Library Manager to Rebuild Your iPhoto Library
1 - download iPhoto Library Manager and launch.>Click on the Add Library button,
2 - select the library you want to add from those in the selection window.
3 - make sure that in the rebuild window the checkbox "Scavange orphaned photos" is checked.
4 - now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option
5 - in the next window name the new library and select the location you want it to be placed. Click on the Create button.
Note 1: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments. However, books, calendars, cards and slideshows will be lost.
Note 2: Your current library will be left untouched for further attempts at a fix if so desired.
You'll have to recreate your slideshow after using this method. -
The code below is a simple powershell statement which enables me to change the execution policy so that I can run powershell scripts. When I run this in a normal windows enviroment the statement will work fine, not giving me an issue whatsoever. However,
whenever it runs in the task sequence the TS fails. I am running this via the command line option in the task sequence, each time running this step as 3 different types of administrators.
powershell.exe -noninteractive Set-ExecutionPolicy -ExecutionPolicy unrestricted
Checking the log file it states this:
Set-ExecutionPolicy : The term 'Set-ExecutionPolicy' is not recognized as the InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
name of a cmdlet, function, script file, or operable program. Check the InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
spelling of the name, or if a path was included, verify that the path is InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
correct and try again. InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
At line:1 char:1 InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ Set-ExecutionPolicy -ExecutionPolicy unrestricted InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ ~~~~~~~~~~~~~~~~~~~ InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ CategoryInfo : ObjectNotFound: (Set-ExecutionPolicy:String) [], InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
CommandNotFoundException InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
+ FullyQualifiedErrorId : CommandNotFoundException InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
InstallSoftware 13/10/2014 17:28:09 3768 (0x0EB8)
Failed to run the action: Script Exception.
Incorrect function. (Error: 00000001; Source: Windows) TSManager 13/10/2014 17:28:09 2716 (0x0A9C)
I am new to both SCCM and Powershell, but from my point of view, this should work, considering that the syntax is not actually incorrect? Please could anyone with any idea drop some hints and tips on how to
stop this issue.I'm not using 3 admin accounts at once if that's how it sounded. I have tried 3 different Admin accounts because I felt that perhaps the difference in permissions may have made a difference in whether I was able to run the syntax and scripts. So I tried
using my own personal administrator account, the SCCMNA account, and the local admin account, which I read worked.
At this point in the task sequence I have:
- Installed the OS
- Connected to the domain
- Installed Applications such as; Flash, Shockware, Reader etc.
Once it has installed the last application within a folder called "Helper Apps" (Which contains various Java and Adobe apps which install fine) it will then run a "Use Toolkit Package" using the MDT toolkit, once this stage is complete
it then progresses to the Script Exception section of the TS.
powershell.exe -noninteractive Set-ExecutionPolicy -ExecutionPolicy unrestricted
I obviously need this to work otherwise I am not allowed to run the script, but because this syntax is "incorrect" it stops the task sequence.
I hope this information might shed some more light on the situation. -
Primary index does not exist in database but shows in SE14?
I added a couple of key fields to a Z table and activated it. Every thing went well - adjusted it with SE14 also.
When I checked the Runtime object - it is OK.
When I checked Database Object, it is showing that the Primary Index does not exist in Database but SE14 says that the Priamry Index exists in Database.
Please advise how to correct this. I saw another psoting when I searched per this error message: "Indexes: Inconsistent with DDIC source" . It tells to create this index at Database but need to know the steps.
pl advise.
(reposting here)
Edited by: Venkatabby on Mar 26, 2008 4:05 PMhi,
To create a index for a table,
go to se11->click on Indexes tab and create a primary index.
Indexes speed up data selection from the database. They consist of selected fields of a table, of which a copy is then made in sorted order. If you specify the index fields correctly in a condition in the WHERE or HAVING clause, the system only searches part of the index (index range scan).
The system automatically creates the primary index. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE.
If you cannot use the primary index to determine the result set because, for example, none of the primary index fields occur in the WHERE or HAVINGclauses, the system searches through the entire table (full table scan). For this case, you can create secondary indexes, which can restrict the number of table entries searched to form the result set.
You create secondary indexes using the ABAP Dictionary. There you can create its columns and define it as UNIQUE.
reward points if useful.
regards
sandhya -
I switched on my PC and there was an update for realplayer. Since then firefox will not open as a window. It is running according to Task Manager. I've downloaded a another copy of the programme using IE but whilst it loaded as a programme, does not open a window.
Hi again,
Helps if I give the correct link ! <br/>The press shift button appears to still work, but the option to start in safe mode from the programs listing of a standard install I do not think exists anymore.
Safe mode will start from a command line, (or a shortcut) and in some circumstances you may need to enter the full path name on a command or shortcut detailed instructions are at http://kb.mozillazine.org/Safe_mode
Remember (at least at this stage) do not make changes when you get the options list, just click on the continue button.
If you think that RealPlayer is causing the problem you could uninstall that for now.
Firefox recent versions are 3.6 4.0 (and 5.0 in beta). There is some debate as to whether creating new profiles or re-installing Firefox is the simplest method of troubleshooting and solving some of these problems, personally I use multiple profiles and multiple versions of Firefox, and tend to forget the required procedures are less than straightforward. For now at least try [[safe mode]] again.
* see also Instructions for [[installing a previous version of firefox]] -
Trying to open old iPhoto library on osx 10.9.5 with iPhoto 9.5.1. iPhoto says I must upgrade but upgrade eventually hangs. Tried to rebuild/repair database but it always says you have to upgrade database first and eventually hangs
What version was the old library made with?
What is the exact message? when it hangs does it crash or do you have to force quit?
LN -
Shrink Database (Rebuild Indexes)
Hi
I would like to know that, If I shrink my DB and started rebuilding indexes how much time it would require to rebuild a DB of size 1 GB.
Thanks ...
ManishWhy to shrink, as you probably know after rebuilding in may grow again :-)))
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence
Maybe you are looking for
-
I just upgraded from an iphone 4 to 5a s, I backed up all my photos to the cloud with the 4 but now cannot access them with my 5s. Does anyone know how to do this? Help?
-
Link editor to video playback?
Does anyone know how to link edit functions with playback from the video track? In Pro Tools and Soundtrack Pro you can move or trim a clip and the video playback immediately jumps to where you're performing your edit. This way you can get spot effec
-
Mail is Frozen because of outgoing attachment
Yikes..I was trying to send an e-mail with a very large video file. Too large obviously. Anyway..it's stuck in my OUTGOING mailbox and every time I open mail I see "configuring mail headers"..or "sorting messages" and I get the please wait color whee
-
How do I get Yahoo messenger to work
How do I get yahoo messenger to work on new iMac as well as find the menu items for video or microphone chat?
-
Hardware Requirement for Implementing Oracle Business Intelligence
Gooday all, We run our E-business suite on HP-UX servers. Our Application run on HP-UX PA-RISC while Database run on HP-UX PA-Itanium. We use Oracle Discoverer BI but we want to go on Oracle Business Intelligence. What hardware requirement to we need