Created
July 29, 2015 11:49
-
-
Save pradeepwebonise/7fc8360242af764f2608 to your computer and use it in GitHub Desktop.
All tournaments with tournament ids to which user had made entries [ with 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 ======================== | |
|* 2 | VIEW | | 6 | 49596 | 3 (0)| 00:00:01 | | |
| 3 | COUNT | | | | | | | |
| 4 | VIEW | | 6 | 49518 | 3 (0)| 00:00:01 | | |
|* 5 | TABLE ACCESS BY INDEX ROWID| TOURNAMENT | 6 | 2910 | 3 (0)| 00:00:01 | | |
|* 6 | INDEX RANGE SCAN | SUBMISSION_PUBLISH_CLOSE | 1 | | 1 (0)| 00:00:01 | | |
------------------------------------------------------------------------------------------------------------ | |
Predicate Information (identified by operation id): | |
--------------------------------------------------- | |
1 - filter(ROWNUM<=10) | |
2 - filter("RN">0) | |
5 - filter("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')) | |
6 - access("T"."PUBLISHED"=1 AND "T"."CLOSED"=0 AND | |
"T"."SUBMISSION_DEADLINE">=TO_TIMESTAMP('20-05-15 06:45:00.000000000 AM') AND | |
"T"."SUBMISSION_DEADLINE" IS NOT NULL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment