List:General Discussion« Previous MessageNext Message »
From:Olga Lyashevska Date:October 27 2009 5:11pm
Subject:Re: results of the query as a table
View as plain text  
Dear Steve,

On 27.10.2009, at 16:19, Steve Edberg wrote:
>  Or you could do an ALTER TABLE afterwards to add appropriate  
> indexes. And are you familiar with the EXPLAIN command to help  
> optimize queries/decide what indexes to add?

Thanks for this! I have added indicies with ALTER TABLE.
And using EXPLAIN  and ANALYZE TABLE I found out that in fact I am  
creating a huge Cartesian product joining fields of two tables which  
are not indexed!
No wonder it took ages to get this query done, I used up 99% of CPU.  
Definitely it can and it should be optimized.
Thanks for your tips again.

Cheers,
Olga

Thread
results of the query as a tableOlga Lyashevska27 Oct
  • Re: results of the query as a tableSteve Edberg27 Oct
    • Re: results of the query as a tableOlga Lyashevska27 Oct
      • Re: results of the query as a tableSteve Edberg27 Oct
        • Re: results of the query as a tableOlga Lyashevska27 Oct