Re: Am I really stupid???

From: Karl DeBisschop <kdebisschop(at)h00a0cc3b7988(dot)ne(dot)mediaone(dot)net>
To: ddd(at)genesis(dot)homeip(dot)net
Cc: pgsql-general(at)hub(dot)org
Subject: Re: Am I really stupid???
Date: 2000-05-17 11:45:34
Message-ID: 3922865E.5469417@h00a0cc3b7988.ne.mediaone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dragos Stoichita wrote:

> Original message from: Fabrice Scemama
> >On finit par penser que ta question comporte en elle
> >sa propre reponse :-)
> >informe-toi sur les joins en particulier et le SQL en general.
> >Tu critiqueras la liste et les gens ensuite.
> >
> >(translation to English-speaking mailing-list users:
> > I replied 'RTFM' :-)
> >
> >Fabrice Scemama
> >
> >Dragos Stoichita wrote:
>
> Let's get rid of those kind of messages.

I agree.

> When you write a message
> saying you are a beginner, there's always a little bunch of people like
> you who particularly like to say: "go read the docs newbie" or
> "go learn that" etc.
>
> I am not someone who never reads the docs before asking a question.
> I know SQL, I know joins, and all the people who told me to rewrite
> the query would better have not answered my message, because
> I already knew that.

Unfortunantely email often does not include a knowlege meter that tells
others what is know or not. Some people are better at making guesses that
others, but it's not always easy.

> I take your message as a personal insult, because I don't criticize
> people without reason, and I did criticize this list because it was
> justified.

I'm not convinced that your criticism of the list was justified (you are
of course welcome to draw your own conclusions).

> I need help about only once every 2 or three months, because I am
> able to use the docs and do my own work alone.
>
> HERE I AM NOT ASKING HELP!
>
> I asked a simple question: why the query with intersects is not only
> slower, but with a factor of 10^something slower than the join one.
> If the select returns a table of 1 column with n rows all integers,
> sorting them ~n*logn, unique is ~n and intersect is ~n. I have here
> a book on Algorithmics and have validated a course on this, I know
> what I talk about. Why, with performant sorting, unique and intersect
> algorithms, it takes 13 seconds???
>
> I just want a real serious person that has knowledge to answer this
> precise question, using an algorithmic demonstration. I only talk about
> maths and algorithms here.

If you wish to talk about the actual implemented algorithms, you might
have done better posting to the hackers mailing list. But remember,
unless you pay for support, you have no intrinsic right to expect that
others will take the problem as seriously as you do. Particularly if you
cannot be VERY clear about what the problem is and what questions you want
answerred. That being said, the developers have always treated me well.

As for your specific question, I'd like to ask if you've run the vaious
queries and subqueries using 'explain' -- it is sometimes the case that
indexes do not behave as you would expect or hope on complex queries. I
think that historical experience with this fact is what caused some well
meaning responders to suggest rewrite alternatives for you. I do not
think it was out of ill will or a desire to insult your intelligence.

For example, if you look through the archive you will see quite a few
discussions about slow returns from "SELECT * FROM foo WHERE x in (...)"
-- this is a fact about the current implementation of PostgreSQL and the
(only?) solution is to rewrite using "WHERE EXISTS ...." Though I forget
the exact reason, it turns out that it is not a trivial matter to have the
optimizer rewrite the first query into the second (and of course the first
is slow because it cannot use inidces). Your question could be a similar
case, or it could be a repairable shortcoming in the planner/optimizer.

In either case, explain will help and the developers/hackers may be able
to give specific insight, as may browsing the code.

> Please be serious in your answer next time.

I am being as serious as I can. Please do not take offense at anything I
have said -- offense or insult is explicitly not my intent. My intent is
to help. And maybe to gently suggest that in most cases where insult is
percieved on these lists, it was not intended, and that it always takes
two parties to escalate the sense of insult.

Karl DeBisschop

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeffery Collins 2000-05-17 12:14:41 Re: 7.0 psql, readline and history.
Previous Message Marcin Inkielman 2000-05-17 11:42:33 Re: 7.0 psql, readline and history.