pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
optimization
2+ messages / 1 participants
[nested] [flat]

* optimization
@ 1998-11-21 08:02  sqyang <sqyang@nudt.edu.cn>
  0 siblings, 0 replies; 2+ messages in thread

From: sqyang @ 1998-11-21 08:02 UTC (permalink / raw)
  To: pgsql-sql

Hi:
	I create a table tenk. Then I loaded 5000 tuples from a data file to
the table by 'copy' command. The command is as follows: "copy tenk from
'/home/post64/test/t100000.dat' using delimiters ',';". Then I lookup
the pg_class to see some statistic informations about the table such as
tuple number and page number etc. The command is:"select * from pg_class
where relname = 'tenk'". But suprisly,values of these two fields are 0.
Are these statistic information are maintained?
	Thanks in advance!



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* optimization
@ 1998-11-23 02:41  sqyang <sqyang@nudt.edu.cn>
  0 siblings, 0 replies; 2+ messages in thread

From: sqyang @ 1998-11-23 02:41 UTC (permalink / raw)
  To: pgsql-sql

1. I had install postgresql-v6.4 on my linux2.0.3. And it runs well. I
had created two tables and inserted 2000 tuples in each of them. But
pg_class shows that the two tables both contain 0 tuples and have 0
blocks.

2. I'd like to know what optimizations the postgresql takes for nestloop
join. I list the execution plan of selection statement. I found that the
plan relies only on the order in which the tables occur in the select
list. It seems there is no optimization for nestloop join.Here are four
statements and their result plans.(onek: 1000 tuples, tenk 10000 tuples)
statement: 
	select onek.unique1, tenk.unique1 from onek, tenk;
plan:
	Nested Loop  (cost=0.00 size=1 width=8)
	  ->  Seq Scan on tenk  (cost=0.00 size=0 width=4)
	  ->  Seq Scan on onek  (cost=0.00 size=0 width=4)

statement:
	select onek.unique1, tenk.unique1 from tenk, onek;
plan:
	Nested Loop  (cost=0.00 size=1 width=8)
	  ->  Seq Scan on tenk  (cost=0.00 size=0 width=4)
	  ->  Seq Scan on onek  (cost=0.00 size=0 width=4)
	
statement:
	select tenk.unique1, onek.unique1 from onek, tenk;
plan:
	Nested Loop  (cost=0.00 size=1 width=8)
	  ->  Seq Scan on onek  (cost=0.00 size=0 width=4)
	  ->  Seq Scan on tenk  (cost=0.00 size=0 width=4)
	
statement:
	select tenk.unique1, onek.unique1 from tenk, onek;
plan:
	Nested Loop  (cost=0.00 size=1 width=8)
	  ->  Seq Scan on onek  (cost=0.00 size=0 width=4)
	  ->  Seq Scan on tenk  (cost=0.00 size=0 width=4)

Are these conclusions true?
Thanks in advance!



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-11-23 02:41 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-11-21 08:02 optimization sqyang <sqyang@nudt.edu.cn>
1998-11-23 02:41 optimization sqyang <sqyang@nudt.edu.cn>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox