Last active
August 29, 2015 14:26
-
-
Save pradeepwebonise/02a4c4712f33fb1f27dd to your computer and use it in GitHub Desktop.
All tournaments with tournament ids to which user had made entries [ without indexing ]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- getting all tournaments with tournament ids to which user had made entries------------- | |
EXPLAIN PLAN FOR | |
SELECT * FROM ( | |
SELECT rownum as rn, a.* FROM ( | |
SELECT * FROM Tournament t WHERE t.published = 1 AND t.closed = 0 AND t.cancelled = 0 AND t.submission_deadline >= '20-05-15 06:45:00.000000000 AM' AND ( t.is_private = 0 OR (t.tournament_id IN (132, 131) OR t.allowed_user_emails LIKE '%bkhanna@drf.com') ) ORDER BY submission_deadline ASC | |
) a | |
) WHERE rownum <= 10 AND rn > (1 - 1) * 10 | |
============ Output ======================== | |
Plan hash value: 477096023 | |
------------------------------------------------------------------------------------- | |
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | | |
------------------------------------------------------------------------------------- | |
| 0 | SELECT STATEMENT | | 6 | 49596 | 8 (13)| 00:00:01 | | |
|* 1 | COUNT STOPKEY | | | | | | | |
|* 2 | VIEW | | 6 | 49596 | 8 (13)| 00:00:01 | | |
| 3 | COUNT | | | | | | | |
| 4 | VIEW | | 6 | 49518 | 8 (13)| 00:00:01 | | |
| 5 | SORT ORDER BY | | 6 | 2910 | 8 (13)| 00:00:01 | | |
|* 6 | TABLE ACCESS FULL| TOURNAMENT | 6 | 2910 | 7 (0)| 00:00:01 | | |
------------------------------------------------------------------------------------- | |
Predicate Information (identified by operation id): | |
--------------------------------------------------- | |
1 - filter(ROWNUM<=10) | |
2 - filter("RN">0) | |
6 - filter("T"."PUBLISHED"=1 AND "T"."SUBMISSION_DEADLINE">=TO_TIMESTAMP(' | |
20-05-15 06:45:00.000000000 AM') AND "T"."CANCELLED"=0 AND | |
("T"."IS_PRIVATE"=0 OR ("T"."TOURNAMENT_ID"=131 OR "T"."TOURNAMENT_ID"=132) | |
OR "T"."ALLOWED_USER_EMAILS" IS NOT NULL AND "T"."ALLOWED_USER_EMAILS" IS | |
NOT NULL AND "T"."ALLOWED_USER_EMAILS" LIKE '%bkhanna@drf.com') AND | |
"T"."CLOSED"=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment