From: | Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com> |
---|---|
To: | "Postgres General List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Optimizing projections containing unused columns |
Date: | 2008-10-16 17:51:06 |
Message-ID: | 2f4958ff0810161051v4822aedbhee8b30a9761236c0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
not so smart yet ;)
thickbook:~ gj$ psql gj
Timing is on.
psql (8.4devel)
Type "help" for help.
gj=# create table smartarse(id bigserial, v varchar not null , primary key
(id, v));
NOTICE: CREATE TABLE will create implicit sequence "smartarse_id_seq" for
serial column "smartarse.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"smartarse_pkey" for table "smartarse"
CREATE TABLE
Time: 172,315 ms
gj=# \d+ smartarse
Table "public.smartarse"
Column | Type | Modifiers
| Storage | Description
--------+-------------------+--------------------------------------------------------+----------+-------------
id | bigint | not null default
nextval('smartarse_id_seq'::regclass) | plain |
v | character varying | not null
| extended |
Indexes:
"smartarse_pkey" PRIMARY KEY, btree (id, v)
Has OIDs: no
gj=# insert into smartarse(v) values('one'), ('two'), ('three'), ('four');
INSERT 0 4
Time: 1,500 ms
gj=# explain select count(*) from smartarse where v is null;
QUERY PLAN
----------------------------------------------------------------
Aggregate (cost=21.62..21.63 rows=1 width=0)
-> Seq Scan on smartarse (cost=0.00..21.60 rows=6 width=0)
Filter: (v IS NULL)
(3 rows)
Time: 1,115 ms
but, getting more and more smart - that's for sure :)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2008-10-16 19:29:43 | Re: Optimizing projections containing unused columns |
Previous Message | Ivan Sergio Borgonovo | 2008-10-16 17:28:15 | Re: ssl woes after 8.1 -> 8.3 update |