Re: Execution plan Question - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: Execution plan Question
Date
Msg-id 3E6CC7C4.5050908@klaster.net
Whole thread Raw
In response to Execution plan Question  ("Objectz" <objectz@postmark.net>)
Responses Re: Execution plan Question  ("Objectz" <objectz@postmark.net>)
List 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 by date:

Previous
From: "Objectz"
Date:
Subject: Execution plan Question
Next
From: Lee Harr
Date:
Subject: Re: Beginner needs help