[BACK]Return to hash_joins.out CVS log [TXT][DIR] Up to [pgFoundry] / uint / uint / expected

File: [pgFoundry] / uint / uint / expected / hash_joins.out (download)

Revision 1.1, Mon Sep 29 04:53:59 2008 UTC (23 months ago) by rbrad
Branch: MAIN
CVS Tags: HEAD

Initial checking for the unsigned integer data type.

SET enable_bitmapscan = OFF;
SET enable_mergejoin = OFF;
SET enable_nestloop = OFF;
SET enable_sort = OFF;
SET enable_tidscan = OFF;
-- uint1 hash joins
CREATE TABLE t1_uint1 (f1 uint1 primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "t1_uint1_pkey" for table "t1_uint1"
INSERT INTO t1_uint1 SELECT generate_series(1, 255);
ANALYZE t1_uint1;
--EXPLAIN SELECT * FROM t1_uint1, generate_series(1, 10) AS foo WHERE t1_uint1.f1 = foo::uint1;
SELECT * FROM t1_uint1, generate_series(1, 10) AS foo WHERE t1_uint1.f1 = foo::uint1;
 f1 | foo
----+-----
 1  |   1
 2  |   2
 3  |   3
 4  |   4
 5  |   5
 6  |   6
 7  |   7
 8  |   8
 9  |   9
 10 |  10
(10 rows)

--EXPLAIN SELECT * FROM t1_uint1, generate_series(1, 10) AS foo WHERE foo::uint1 = t1_uint1.f1;
SELECT * FROM t1_uint1, generate_series(1, 10) AS foo WHERE foo::uint1 = t1_uint1.f1;
 f1 | foo
----+-----
 1  |   1
 2  |   2
 3  |   3
 4  |   4
 5  |   5
 6  |   6
 7  |   7
 8  |   8
 9  |   9
 10 |  10
(10 rows)

-- uint2 hash joins
CREATE TABLE t1_uint2 (f1 uint2 primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "t1_uint2_pkey" for table "t1_uint2"
INSERT INTO t1_uint2 SELECT generate_series(1, 255);
ANALYZE t1_uint2;
--EXPLAIN SELECT * FROM t1_uint2, generate_series(1, 10) AS foo WHERE t1_uint2.f1 = foo::uint2;
SELECT * FROM t1_uint2, generate_series(1, 10) AS foo WHERE t1_uint2.f1 = foo::uint2;
 f1 | foo
----+-----
 1  |   1
 2  |   2
 3  |   3
 4  |   4
 5  |   5
 6  |   6
 7  |   7
 8  |   8
 9  |   9
 10 |  10
(10 rows)

--EXPLAIN SELECT * FROM t1_uint2, generate_series(1, 10) AS foo WHERE foo::uint2 = t1_uint2.f1;
SELECT * FROM t1_uint2, generate_series(1, 10) AS foo WHERE foo::uint2 = t1_uint2.f1;
 f1 | foo
----+-----
 1  |   1
 2  |   2
 3  |   3
 4  |   4
 5  |   5
 6  |   6
 7  |   7
 8  |   8
 9  |   9
 10 |  10
(10 rows)

-- uint4 hash joins
CREATE TABLE t1_uint4 (f1 uint4 primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "t1_uint4_pkey" for table "t1_uint4"
INSERT INTO t1_uint4 SELECT generate_series(1, 255);
ANALYZE t1_uint4;
--EXPLAIN SELECT * FROM t1_uint4, generate_series(1, 10) AS foo WHERE t1_uint4.f1 = foo;
SELECT * FROM t1_uint4, generate_series(1, 10) AS foo WHERE t1_uint4.f1 = foo;
 f1 | foo 
----+-----
 1  |   1
 2  |   2
 3  |   3
 4  |   4
 5  |   5
 6  |   6
 7  |   7
 8  |   8
 9  |   9
 10 |  10
(10 rows)

--EXPLAIN SELECT * FROM t1_uint4, generate_series(1, 10) AS foo WHERE foo = t1_uint4.f1;
SELECT * FROM t1_uint4, generate_series(1, 10) AS foo WHERE foo = t1_uint4.f1;
 f1 | foo 
----+-----
 1  |   1
 2  |   2
 3  |   3
 4  |   4
 5  |   5
 6  |   6
 7  |   7
 8  |   8
 9  |   9
 10 |  10
(10 rows)