firtst release
Revisão | b2102f707ed4dda9713ebd144c95800252d21c33 (tree) |
---|---|
Hora | 2013-08-05 11:40:19 |
Autor | Takashi Suzuki <suzuki.takashi@metr...> |
Commiter | Takashi Suzuki |
[スキャン方式]試験のSQLファイルの試験番号を更新し、No.S-3-10の試験のSQLを追加した。
@@ -829,28 +829,28 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1; | ||
829 | 829 | EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1; |
830 | 830 | |
831 | 831 | ---- |
832 | ----- No. S-3-7 query structure | |
832 | +---- No. S-3-6 query structure | |
833 | 833 | ---- |
834 | 834 | |
835 | 835 | EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.ctid = '(1,1)'; |
836 | 836 | |
837 | --- No. S-3-7-1 | |
837 | +-- No. S-3-6-1 | |
838 | 838 | /*+SeqScan(t1)*/ |
839 | 839 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE c1 = 100; |
840 | 840 | |
841 | --- No. S-3-7-2 | |
841 | +-- No. S-3-6-2 | |
842 | 842 | /*+SeqScan(t1)BitmapScan(t2)*/ |
843 | 843 | EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.ctid = '(1,1)'; |
844 | 844 | |
845 | --- No. S-3-7-3 | |
845 | +-- No. S-3-6-3 | |
846 | 846 | /*+SeqScan(t1)*/ |
847 | 847 | EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.ctid = '(1,1)'; |
848 | 848 | |
849 | 849 | ---- |
850 | ----- No. S-3-8 query structure | |
850 | +---- No. S-3-7 query structure | |
851 | 851 | ---- |
852 | 852 | |
853 | --- No. S-3-8-1 | |
853 | +-- No. S-3-7-1 | |
854 | 854 | EXPLAIN (COSTS false) |
855 | 855 | WITH c1 (c1) AS ( |
856 | 856 | SELECT max(b1t1.c1) FROM s1.t1 b1t1 WHERE b1t1.c1 = 1) |
@@ -868,7 +868,7 @@ SELECT max(b2t1.c1) FROM s1.t1 b2t1 WHERE b2t1.c1 = 1 | ||
868 | 868 | ) FROM s1.t1 b3t1 WHERE b3t1.c1 = ( |
869 | 869 | SELECT max(b4t1.c1) FROM s1.t1 b4t1 WHERE b4t1.c1 = 1); |
870 | 870 | |
871 | --- No. S-3-8-2 | |
871 | +-- No. S-3-7-2 | |
872 | 872 | EXPLAIN (COSTS false) |
873 | 873 | WITH cte1 (c1) AS ( |
874 | 874 | SELECT max(b1t1.c1) FROM s1.t1 b1t1 JOIN s1.t2 b1t2 ON(b1t1.c1 = b1t2.c1) WHERE b1t1.c1 = 1) |
@@ -887,7 +887,7 @@ SELECT max(b2t1.c1) FROM s1.t1 b2t1 JOIN s1.t2 b2t2 ON(b2t1.c1 = b2t2.c1) WHERE | ||
887 | 887 | ) FROM s1.t1 b3t1 JOIN s1.t2 b3t2 ON(b3t1.c1 = b3t2.c1) JOIN cte1 ON(b3t1.c1 = cte1.c1) WHERE b3t1.c1 = ( |
888 | 888 | SELECT max(b4t1.c1) FROM s1.t1 b4t1 JOIN s1.t2 b4t2 ON(b4t1.c1 = b4t2.c1) WHERE b4t1.c1 = 1); |
889 | 889 | |
890 | --- No. S-3-8-3 | |
890 | +-- No. S-3-7-3 | |
891 | 891 | EXPLAIN (COSTS false) |
892 | 892 | WITH cte1 (c1) AS ( |
893 | 893 | SELECT max(b1t1.c1) FROM s1.t1 b1t1 JOIN s1.t2 b1t2 ON(b1t1.c1 = b1t2.c1) WHERE b1t1.c1 = 1) |
@@ -907,195 +907,200 @@ SELECT max(b2t1.c1) FROM s1.t1 b2t1 WHERE b2t1.c1 = 1 | ||
907 | 907 | SELECT max(b4t1.c1) FROM s1.t1 b4t1 WHERE b4t1.c1 = 1); |
908 | 908 | |
909 | 909 | ---- |
910 | ----- No. S-3-9 inheritance table select type | |
910 | +---- No. S-3-8 inheritance table select type | |
911 | 911 | ---- |
912 | 912 | |
913 | --- No. S-3-9-1 | |
913 | +-- No. S-3-8-1 | |
914 | 914 | EXPLAIN (COSTS false) SELECT * FROM ONLY s1.p1 WHERE c1 = 1; |
915 | 915 | /*+IndexScan(p1)*/ |
916 | 916 | EXPLAIN (COSTS false) SELECT * FROM ONLY s1.p1 WHERE c1 = 1; |
917 | 917 | |
918 | --- No. S-3-9-2 | |
918 | +-- No. S-3-8-2 | |
919 | 919 | EXPLAIN (COSTS false) SELECT * FROM s1.p1 WHERE c1 = 1; |
920 | 920 | /*+IndexScan(p1)*/ |
921 | 921 | EXPLAIN (COSTS false) SELECT * FROM s1.p1 WHERE c1 = 1; |
922 | 922 | |
923 | 923 | ---- |
924 | ----- No. S-3-10 inheritance table number | |
924 | +---- No. S-3-9 inheritance table number | |
925 | 925 | ---- |
926 | 926 | |
927 | --- No. S-3-10-1 | |
927 | +-- No. S-3-9-1 | |
928 | 928 | EXPLAIN (COSTS false) SELECT * FROM s1.p1 WHERE c1 = 1; |
929 | 929 | /*+IndexScan(p1)*/ |
930 | 930 | EXPLAIN (COSTS false) SELECT * FROM s1.p1 WHERE c1 = 1; |
931 | 931 | |
932 | --- No. S-3-10-2 | |
932 | +-- No. S-3-9-2 | |
933 | 933 | EXPLAIN (COSTS false) SELECT * FROM s1.p2 WHERE c1 = 1; |
934 | 934 | /*+IndexScan(p2)*/ |
935 | 935 | EXPLAIN (COSTS false) SELECT * FROM s1.p2 WHERE c1 = 1; |
936 | 936 | |
937 | 937 | ---- |
938 | ----- No. S-3-11 inheritance table specified table | |
938 | +---- No. S-3-10 inheritance table specified table | |
939 | 939 | ---- |
940 | 940 | |
941 | 941 | EXPLAIN (COSTS false) SELECT * FROM s1.p2 WHERE c1 = 1; |
942 | 942 | |
943 | --- No. S-3-11-1 | |
943 | +-- No. S-3-10-1 | |
944 | 944 | /*+IndexScan(p2)*/ |
945 | 945 | EXPLAIN (COSTS false) SELECT * FROM s1.p2 WHERE c1 = 1; |
946 | 946 | |
947 | --- No. S-3-11-2 | |
947 | +-- No. S-3-10-2 | |
948 | 948 | /*+IndexScan(p2c1)*/ |
949 | 949 | EXPLAIN (COSTS false) SELECT * FROM s1.p2 WHERE c1 = 1; |
950 | 950 | |
951 | --- No. S-3-11-3 | |
952 | -/*+IndexScan(p2 p2_pkey p2c1_pkey p2c1c1_pkey)*/ | |
953 | -EXPLAIN (COSTS false) SELECT * FROM s1.p2 WHERE c1 = 1; | |
951 | +-- No. S-3-10-3 | |
952 | +EXPLAIN SELECT c4 FROM s1.p1 WHERE c2 * 2 < 100 AND c1 < 10; | |
953 | +/*+IndexScan(p1 p1_parent)*/ | |
954 | +EXPLAIN SELECT c4 FROM s1.p1 WHERE c2 * 2 < 100 AND c1 < 10; | |
954 | 955 | |
955 | --- No. S-3-11-4 | |
956 | +-- No. S-3-10-4 | |
957 | +/*+IndexScan(p1 p1_i2)*/ | |
958 | +EXPLAIN SELECT c2 FROM s1.p1 WHERE c2 = 1; | |
959 | + | |
960 | +-- No. S-3-10-5 | |
956 | 961 | /*+IndexScan(p2 p2c1_pkey)*/ |
957 | 962 | EXPLAIN (COSTS true) SELECT * FROM s1.p2 WHERE c1 = 1; |
958 | 963 | |
959 | 964 | ---- |
960 | ----- No. S-3-12 specified same table | |
965 | +---- No. S-3-11 specified same table | |
961 | 966 | ---- |
962 | 967 | |
963 | --- No. S-3-12-1 | |
968 | +-- No. S-3-11-1 | |
964 | 969 | /*+IndexScan(ti1) BitmapScan(ti1)*/ |
965 | 970 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
966 | 971 | |
967 | --- No. S-3-12-2 | |
972 | +-- No. S-3-11-2 | |
968 | 973 | /*+IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/ |
969 | 974 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
970 | 975 | |
971 | --- No. S-3-12-3 | |
976 | +-- No. S-3-11-3 | |
972 | 977 | /*+BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)*/ |
973 | 978 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
974 | 979 | |
975 | --- No. S-3-12-4 | |
980 | +-- No. S-3-11-4 | |
976 | 981 | /*+BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/ |
977 | 982 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
978 | 983 | |
979 | 984 | ---- |
980 | ----- No. S-3-13 message output | |
985 | +---- No. S-3-12 message output | |
981 | 986 | ---- |
982 | 987 | |
983 | --- No. S-3-13-1 | |
988 | +-- No. S-3-12-1 | |
984 | 989 | /*+SeqScan(ti1)*/ |
985 | 990 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
986 | 991 | |
987 | --- No. S-3-13-2 | |
992 | +-- No. S-3-12-2 | |
988 | 993 | /*+SeqScan(ti1 ti1_pkey)*/ |
989 | 994 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
990 | 995 | |
991 | --- No. S-3-13-3 | |
996 | +-- No. S-3-12-3 | |
992 | 997 | /*+SeqScan(ti1 ti1_pkey ti1_btree)*/ |
993 | 998 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
994 | 999 | |
995 | --- No. S-3-13-4 | |
1000 | +-- No. S-3-12-4 | |
996 | 1001 | /*+IndexScan(ti1)*/ |
997 | 1002 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
998 | 1003 | |
999 | --- No. S-3-13-5 | |
1004 | +-- No. S-3-12-5 | |
1000 | 1005 | /*+IndexScan(ti1 ti1_pkey)*/ |
1001 | 1006 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1002 | 1007 | |
1003 | --- No. S-3-13-6 | |
1008 | +-- No. S-3-12-6 | |
1004 | 1009 | /*+IndexScan(ti1 ti1_pkey ti1_btree)*/ |
1005 | 1010 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1006 | 1011 | |
1007 | --- No. S-3-13-7 | |
1012 | +-- No. S-3-12-7 | |
1008 | 1013 | /*+BitmapScan(ti1)*/ |
1009 | 1014 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1010 | 1015 | |
1011 | --- No. S-3-13-8 | |
1016 | +-- No. S-3-12-8 | |
1012 | 1017 | /*+BitmapScan(ti1 ti1_pkey)*/ |
1013 | 1018 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1014 | 1019 | |
1015 | --- No. S-3-13-9 | |
1020 | +-- No. S-3-12-9 | |
1016 | 1021 | /*+BitmapScan(ti1 ti1_pkey ti1_btree)*/ |
1017 | 1022 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1018 | 1023 | |
1019 | --- No. S-3-13-10 | |
1024 | +-- No. S-3-12-10 | |
1020 | 1025 | /*+TidScan(ti1)*/ |
1021 | 1026 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1022 | 1027 | |
1023 | --- No. S-3-13-11 | |
1028 | +-- No. S-3-12-11 | |
1024 | 1029 | /*+TidScan(ti1 ti1_pkey)*/ |
1025 | 1030 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1026 | 1031 | |
1027 | --- No. S-3-13-12 | |
1032 | +-- No. S-3-12-12 | |
1028 | 1033 | /*+TidScan(ti1 ti1_pkey ti1_btree)*/ |
1029 | 1034 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1030 | 1035 | |
1031 | --- No. S-3-13-13 | |
1036 | +-- No. S-3-12-13 | |
1032 | 1037 | /*+NoSeqScan(ti1)*/ |
1033 | 1038 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1034 | 1039 | |
1035 | --- No. S-3-13-14 | |
1040 | +-- No. S-3-12-14 | |
1036 | 1041 | /*+NoSeqScan(ti1 ti1_pkey)*/ |
1037 | 1042 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1038 | 1043 | |
1039 | --- No. S-3-13-15 | |
1044 | +-- No. S-3-12-15 | |
1040 | 1045 | /*+NoSeqScan(ti1 ti1_pkey ti1_btree)*/ |
1041 | 1046 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1042 | 1047 | |
1043 | --- No. S-3-13-16 | |
1048 | +-- No. S-3-12-16 | |
1044 | 1049 | /*+NoIndexScan(ti1)*/ |
1045 | 1050 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1046 | 1051 | |
1047 | --- No. S-3-13-17 | |
1052 | +-- No. S-3-12-17 | |
1048 | 1053 | /*+NoIndexScan(ti1 ti1_pkey)*/ |
1049 | 1054 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1050 | 1055 | |
1051 | --- No. S-3-13-18 | |
1056 | +-- No. S-3-12-18 | |
1052 | 1057 | /*+NoIndexScan(ti1 ti1_pkey ti1_btree)*/ |
1053 | 1058 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1054 | 1059 | |
1055 | --- No. S-3-13-19 | |
1060 | +-- No. S-3-12-19 | |
1056 | 1061 | /*+NoBitmapScan(ti1)*/ |
1057 | 1062 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1058 | 1063 | |
1059 | --- No. S-3-13-20 | |
1064 | +-- No. S-3-12-20 | |
1060 | 1065 | /*+NoBitmapScan(ti1 ti1_pkey)*/ |
1061 | 1066 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1062 | 1067 | |
1063 | --- No. S-3-13-21 | |
1068 | +-- No. S-3-12-21 | |
1064 | 1069 | /*+NoBitmapScan(ti1 ti1_pkey ti1_btree)*/ |
1065 | 1070 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1066 | 1071 | |
1067 | --- No. S-3-13-22 | |
1072 | +-- No. S-3-12-22 | |
1068 | 1073 | /*+NoTidScan(ti1)*/ |
1069 | 1074 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1070 | 1075 | |
1071 | --- No. S-3-13-23 | |
1076 | +-- No. S-3-12-23 | |
1072 | 1077 | /*+NoTidScan(ti1 ti1_pkey)*/ |
1073 | 1078 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1074 | 1079 | |
1075 | --- No. S-3-13-24 | |
1080 | +-- No. S-3-12-24 | |
1076 | 1081 | /*+NoTidScan(ti1 ti1_pkey ti1_btree)*/ |
1077 | 1082 | EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)'; |
1078 | 1083 | |
1079 | --- No. S-3-13-25 | |
1084 | +-- No. S-3-12-25 | |
1080 | 1085 | /*+IndexOnlyScan(ti1)*/ |
1081 | 1086 | EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 >= 1; |
1082 | 1087 | |
1083 | --- No. S-3-13-26 | |
1088 | +-- No. S-3-12-26 | |
1084 | 1089 | /*+IndexOnlyScan(ti1 ti1_pkey)*/ |
1085 | 1090 | EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 >= 1; |
1086 | 1091 | |
1087 | --- No. S-3-13-27 | |
1092 | +-- No. S-3-12-27 | |
1088 | 1093 | /*+IndexOnlyScan(ti1 ti1_pkey ti1_btree)*/ |
1089 | 1094 | EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 >= 1; |
1090 | 1095 | |
1091 | --- No. S-3-13-28 | |
1096 | +-- No. S-3-12-28 | |
1092 | 1097 | /*+NoIndexOnlyScan(ti1)*/ |
1093 | 1098 | EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 = 1; |
1094 | 1099 | |
1095 | --- No. S-3-13-29 | |
1100 | +-- No. S-3-12-29 | |
1096 | 1101 | /*+NoIndexOnlyScan(ti1 ti1_pkey)*/ |
1097 | 1102 | EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 = 1; |
1098 | 1103 | |
1099 | --- No. S-3-13-30 | |
1104 | +-- No. S-3-12-30 | |
1100 | 1105 | /*+NoIndexOnlyScan(ti1 ti1_pkey ti1_btree)*/ |
1101 | 1106 | EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 = 1; |
@@ -30,6 +30,7 @@ CREATE TABLE s1.t3 (LIKE s1.t1 INCLUDING ALL); | ||
30 | 30 | CREATE TABLE s1.t4 (LIKE s1.t1 INCLUDING ALL); |
31 | 31 | CREATE TABLE s2.t1 (LIKE s1.t1 INCLUDING ALL); |
32 | 32 | CREATE TABLE s1.p1 (LIKE s1.t1 INCLUDING ALL); |
33 | +CREATE UNIQUE INDEX p1_parent ON s1.p1 USING btree (c4 COLLATE "ja_JP" varchar_ops ASC NULLS LAST, (c1 * 2 < 100)) WHERE c1 < 10; | |
33 | 34 | CREATE TABLE s1.p2 (LIKE s1.t1 INCLUDING ALL); |
34 | 35 | CREATE TABLE s1.p1c1 (LIKE s1.p1 INCLUDING ALL, CHECK (c1 <= 100)) INHERITS(s1.p1); |
35 | 36 | CREATE TABLE s1.p1c2 (LIKE s1.p1 INCLUDING ALL, CHECK (c1 > 100 AND c1 <= 200)) INHERITS(s1.p1); |
@@ -76,6 +77,7 @@ CREATE INDEX t3_i1 ON s1.t3 (c1); | ||
76 | 77 | CREATE INDEX t4_i1 ON s1.t4 (c1); |
77 | 78 | CREATE INDEX p1_i ON s1.p1 (c1); |
78 | 79 | CREATE INDEX p2_i ON s1.p2 (c1); |
80 | +CREATE INDEX p1_i2 ON s1.p1 (c2); | |
79 | 81 | CREATE INDEX p1c1_i ON s1.p1c1 (c1); |
80 | 82 | CREATE INDEX p1c2_i ON s1.p1c2 (c1); |
81 | 83 | CREATE INDEX p1c3_i ON s1.p1c3 (c1); |