From: | Tomasz Myrta <jasiek(at)klaster(dot)net> |
---|---|
To: | Objectz <objectz(at)postmark(dot)net> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Execution plan Question |
Date: | 2003-03-10 17:13:40 |
Message-ID: | 3E6CC7C4.5050908@klaster.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Shraibman | 2003-03-10 22:57:35 | Re: Could someone please sort out the e-mail to news gateway! |
Previous Message | Objectz | 2003-03-10 16:43:17 | Execution plan Question |