Re: [GENERAL] understanding explain data

2006-05-15 Thread Jim C. Nasby
On Wed, May 10, 2006 at 11:00:14PM +1000, chris smith wrote: > On 5/10/06, Alban Hertroys <[EMAIL PROTECTED]> wrote: > >Sim Zacks wrote: > >> Something such as: with this explain data, adding an index on table tbl > >> column A would drastically improve the efficiency. Or at least an > >> applicati

Re: [GENERAL] understanding explain data

2006-05-11 Thread Sim Zacks
Thanks for the script. It does a great job of finding exactly which path is taking the most time. Now for the hard part. Why is that part taking the longest time. Richard Huxton wrote: I've got a short perl script that I throw explain output into. It's not brilliant - can give false positives,

Re: [GENERAL] understanding explain data

2006-05-11 Thread Sim Zacks
Now you're talking about data warehouse design and not optimizing queries, though they are obviously interrelated. A human looking at the explain data would not be able to determine that it would be better to have a summary table either. However, first you would want to optimize your queries a

Re: [GENERAL] understanding explain data

2006-05-10 Thread Richard Huxton
Alban Hertroys wrote: Sim Zacks wrote: Something such as: with this explain data, adding an index on table tbl column A would drastically improve the efficiency. Or at least an application that would say, the least efficient part of your query is on this part of the code so that you could more

Re: [GENERAL] understanding explain data

2006-05-10 Thread Alban Hertroys
Sim Zacks wrote: I disagree with you that a human brain would be better then a machine for optimizing purposes. If the system is programmed to optimize correctly, then it will when to stick data into a temp table and update columns instead of doing a select because x number of joins are too muc

Re: [GENERAL] understanding explain data

2006-05-10 Thread Sim Zacks
I agree with you that an index isn't always the answer, that was more of an example. I was thinking more along the lines of an intelligent part of the database that has access to the statistics and would be able to spit out recommendations for the query. Such as, I type in a monster query and

Re: [GENERAL] understanding explain data

2006-05-10 Thread chris smith
On 5/10/06, Alban Hertroys <[EMAIL PROTECTED]> wrote: Sim Zacks wrote: > Something such as: with this explain data, adding an index on table tbl > column A would drastically improve the efficiency. Or at least an > application that would say, the least efficient part of your query is on > this pa

Re: [GENERAL] understanding explain data

2006-05-10 Thread Alban Hertroys
Sim Zacks wrote: Something such as: with this explain data, adding an index on table tbl column A would drastically improve the efficiency. Or at least an application that would say, the least efficient part of your query is on this part of the code so that you could more easily figure out what

[GENERAL] understanding explain data

2006-05-10 Thread Sim Zacks
I am looking at the explain data for my query and it mostly understandable thanks to an excellent article by Jim Nasby, http://www.pervasive-postgres.com/instantkb13/article.aspx?id=10120 It is very time consuming and confusing walking through the explain. Is there a possibility (or does it ev