Re: NULL values or not? - Mailing list pgsql-sql

From Josh Berkus
Subject Re: NULL values or not?
Date
Msg-id web-534180@davinci.ethosmedia.com
Whole thread Raw
In response to Re: NULL values or not?  (Archibald Zimonyi <archie@netg.se>)
Responses Re: NULL values or not?
List pgsql-sql
Archibald,

> The start of my problems is still the fact that when I do VACUUM
> ANALYZE
> my main query takes almost a minute (from around a second), which has
> made
> me perlexed by the whole thing, since the EXPLAIN shows relatively
> low
> values (although reading that is still an art, I have a query which
> results in more rows and has higher EXPLAIN values but still takes
> less
> time then my main query).

I believe that this is a seperate problem, not at all related to your
use of NULLs or not.  I have queries in some of my databases that join
as many as 18 different tables (some multiple times), and they run fine
and VACUUM speeds them up, as it's supposed to.  So I believe that you
have a configuration, system, or version problem that is unrelated to
your schema.

To get help from the core developers, I suggest that you post, in a
seperate e-mail:
1. Your Postgres version (and if it's not 7.1.3 you should maybe
upgrade)
2. Your schema
3. The query that behaves oddly
4. Explain & time before VACUUM
5. Explain & time after VACUUM
6. Your hardware platform data.
> I have read a book which I find immensly useful and good, called:
> 
> The Practical SQL Handbook 
> 
> published by Addison-Wesley. It is this book that has given me my
> main
> view of SQL and database design.

I would very much appreciate it if you sent me a mini-review of the book
for Techdocs Book Reviews.  See:
http://techdocs.postgresql.org/bookreviews.php 
for format, etc.

> It is this I based my questions on, I know why I do it the way I do,
> but I
> would also like to hear what other people think of this solution, and
> perhaps why I should use NULLS instead. As I said in an earlier post,
> there is a cost of joining the tables, which is higher then having
> one
> table with NULLS.

The cost should not be appreciably higher for your size database.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: Archibald Zimonyi
Date:
Subject: Re: NULL values or not?
Next
From: "Wei Weng"
Date:
Subject: Re: NULL values or not?