~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/pbxt/status.result

  • Committer: Monty Taylor
  • Date: 2008-11-16 05:36:13 UTC
  • mto: (584.1.9 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081116053613-bld4rqxhlkb49c02
Split out cache_row and type_holder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
flush status;
2
 
drop table if exists t1;
3
 
select 1;
4
 
1
5
 
1
6
 
show status like 'last_query_cost';
7
 
Variable_name   Value
8
 
Last_query_cost #
9
 
create temporary table t1 (a int) engine=myisam;
10
 
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
11
 
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
12
 
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
13
 
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
14
 
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
15
 
select * from t1 where a=6;
16
 
a
17
 
6
18
 
6
19
 
6
20
 
6
21
 
6
22
 
show status like 'last_query_cost';
23
 
Variable_name   Value
24
 
Last_query_cost #
25
 
show status like 'last_query_cost';
26
 
Variable_name   Value
27
 
Last_query_cost #
28
 
select 1;
29
 
1
30
 
1
31
 
show status like 'last_query_cost';
32
 
Variable_name   Value
33
 
Last_query_cost #
34
 
drop table t1;
35
 
FLUSH STATUS;
36
 
SHOW STATUS LIKE 'max_used_connections';
37
 
Variable_name   Value
38
 
Max_used_connections    1
39
 
SELECT * FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
40
 
VARIABLE_NAME   VARIABLE_VALUE
41
 
Max_used_connections    1
42
 
SHOW STATUS LIKE 'max_used_connections';
43
 
Variable_name   Value
44
 
Max_used_connections    3
45
 
SELECT * FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
46
 
VARIABLE_NAME   VARIABLE_VALUE
47
 
Max_used_connections    3
48
 
CREATE TABLE t1 ( a INT );
49
 
INSERT INTO t1 VALUES (1), (2);
50
 
SELECT a FROM t1 LIMIT 1;
51
 
a
52
 
1
53
 
SHOW SESSION STATUS LIKE 'Last_query_cost';
54
 
Variable_name   Value
55
 
Last_query_cost 2.45163
56
 
EXPLAIN SELECT a FROM t1;
57
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
58
 
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    #       
59
 
SHOW SESSION STATUS LIKE 'Last_query_cost';
60
 
Variable_name   Value
61
 
Last_query_cost 2.45163
62
 
SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
63
 
a
64
 
1
65
 
2
66
 
SHOW SESSION STATUS LIKE 'Last_query_cost';
67
 
Variable_name   Value
68
 
Last_query_cost 0
69
 
EXPLAIN SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
70
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
71
 
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       
72
 
2       UNION   t1      ALL     NULL    NULL    NULL    NULL    #       
73
 
NULL    UNION RESULT    <union1,2>      ALL     NULL    NULL    NULL    NULL    #       Using filesort
74
 
SHOW SESSION STATUS LIKE 'Last_query_cost';
75
 
Variable_name   Value
76
 
Last_query_cost 0
77
 
SELECT a IN (SELECT a FROM t1) FROM t1 LIMIT 1;
78
 
a IN (SELECT a FROM t1)
79
 
1
80
 
SHOW SESSION STATUS LIKE 'Last_query_cost';
81
 
Variable_name   Value
82
 
Last_query_cost 0
83
 
SELECT (SELECT a FROM t1 LIMIT 1) x FROM t1 LIMIT 1;
84
 
x
85
 
1
86
 
SHOW SESSION STATUS LIKE 'Last_query_cost';
87
 
Variable_name   Value
88
 
Last_query_cost 0
89
 
SELECT * FROM t1 a, t1 b LIMIT 1;
90
 
a       a
91
 
1       1
92
 
SHOW SESSION STATUS LIKE 'Last_query_cost';
93
 
Variable_name   Value
94
 
Last_query_cost 4.90426
95
 
DROP TABLE t1;