Re: Execution plan Question

Поиск
Список
Период
Сортировка
От Tomasz Myrta
Тема Re: Execution plan Question
Дата
Msg-id 3E6CC7C4.5050908@klaster.net
обсуждение исходный текст
Ответ на Execution plan Question  ("Objectz" <objectz@postmark.net>)
Ответы Re: Execution plan Question  ("Objectz" <objectz@postmark.net>)
Список pgsql-sql
Objectz wrote:
> hi all,
> 
> I have a strange problem and really wish to get some help in here.
> 
> I have the following tables
> 
> create table shr_objects(
>     objectid     int8     not null
>     companyid     int4    not null
>     name        varchar(255) 
>     description    varchar(255)
> )
> primary key : object id
> foreign key on companyid references shr_companies(companyid)
> Index on companyid    
> Number of rows ~ 1,410,000
> 
> create table smb_contacts{
>     contactid    int4    not null
>     objectid    int8    not null
>     firstname    varchar(255)
>     lastname    varchar(255)
> )
> primary key : contactid
> foreign key on objectid references shr_objects9objectid)
> index on : objectid
> Number of rows ~ 10,000
> 
> I am trying to execute a query that joins the 2 tables on object id , it
> works fine but when i add an order clause the performance is degarded
> dramatically. I have included both quiries with their excution plan.
> 
> Regards,
> --ObjectZ Maker
Well, it looks like you didn't include neither queries nor there 
execution plan. Don't forget to vacuum analyze before explain analyze 
your queries.

Anyway, how many rows do you want to be sorted?

Regards,
Tomasz Myrta




В списке pgsql-sql по дате отправления:

Предыдущее
От: "Objectz"
Дата:
Сообщение: Execution plan Question
Следующее
От: Lee Harr
Дата:
Сообщение: Re: Beginner needs help