Skip site navigation (1) Skip section navigation (2)

Re: ported application having performance issues

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: John Mendenhall <john(at)surfutopia(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: ported application having performance issues
Date: 2005-06-30 22:35:38
Message-ID: 42C473BA.9090305@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-performance
> Thank you very much in advance for any pointers you can
> provide.  And, if this is the wrong forum for this question,
> please let me know and I'll ask it elsewhere.

I think you may want to increase your statistics_target plus make sure 
you are running analyze. explain anaylze would do.

Sincerely,

Joshua D. Drake



> 
> JohnM
> 
> 
> 
> 
> 
> -----
> table definitions
> -----
> 
> -----
> db=> \d contacts
>                        Table "db.contacts"
>             Column            |            Type             | Modifiers 
> ------------------------------+-----------------------------+-----------
>  id                           | numeric(38,0)               | not null
>  db_id                        | character varying(32)       | 
>  firstname                    | character varying(64)       | 
>  lastname                     | character varying(64)       | 
>  company                      | character varying(128)      | 
>  email                        | character varying(256)      | 
>  phone                        | character varying(64)       | 
>  address                      | character varying(128)      | 
>  city                         | character varying(128)      | 
>  state                        | character varying(32)       | 
>  postalcode                   | character varying(16)       | 
>  country                      | character varying(2)        | not null
>  contact_info_modified        | character(1)                | 
>  token_id                     | numeric(38,0)               | 
>  status_id                    | numeric(38,0)               | 
>  status_last_modified         | timestamp without time zone | 
>  notes                        | character varying(2000)     | 
>  demo_schedule                | timestamp without time zone | 
>  partner_id                   | numeric(38,0)               | 
>  prev_partner_id              | numeric(38,0)               | 
>  prev_prev_partner_id         | numeric(38,0)               | 
>  site_last_visited            | timestamp without time zone | 
>  source_id                    | numeric(4,0)                | 
>  demo_requested               | timestamp without time zone | 
>  sourcebook_requested         | timestamp without time zone | 
>  zip                          | numeric(8,0)                | 
>  suffix                       | numeric(8,0)                | 
>  feedback_request_sent        | timestamp without time zone | 
>  products_sold                | character varying(512)      | 
>  other_brand                  | character varying(512)      | 
>  printsample_requested        | timestamp without time zone | 
>  indoor_media_sample          | timestamp without time zone | 
>  outdoor_media_sample         | timestamp without time zone | 
>  printers_owned               | character varying(256)      | 
>  business_type                | character varying(256)      | 
>  printers_owned2              | character varying(256)      | 
>  contact_quality_id           | numeric(38,0)               | 
>  est_annual_value             | numeric(38,2)               | 
>  likelyhood_of_closing        | numeric(38,0)               | 
>  priority                     | numeric(38,0)               | 
>  business_type_id             | numeric(38,0)               | 
>  lead_last_modified           | timestamp without time zone | 
>  lead_value                   | numeric(38,2)               | 
>  channel_contact_flag         | character(1)                | 
>  request_status_last_modified | timestamp without time zone | 
>  master_key_number            | numeric(38,0)               | 
>  master_key_token             | character varying(32)       | 
>  current_media_cust           | character(1)                | 
>  kodak_media_id               | numeric(38,0)               | 
>  printer_sample_id            | numeric(38,0)               | 
>  quantity_used_id             | numeric(38,0)               | 
>  rip_used_id                  | numeric(38,0)               | 
>  language_code                | character varying(3)        | 
>  region_id                    | numeric(38,0)               | not null
>  lead_deleted                 | timestamp without time zone | 
>  last_request_set_status_id   | numeric(38,0)               | 
>  address2                     | character varying(128)      | 
>  media_usage_id               | numeric(38,0)               | 
> Indexes:
>     "contacts_pkey" primary key, btree (id)
>     "contacts_partner_id_idx" btree (partner_id)
>     "contacts_partner_id_null_idx" btree (partner_id) WHERE (partner_id IS NULL)
>     "contacts_token_id_idx" btree (token_id)
> Check constraints:
>     "sys_c0050644" CHECK (country IS NOT NULL)
>     "sys_c0050643" CHECK (id IS NOT NULL)
>     "sys_c0050645" CHECK (region_id IS NOT NULL)
> Triggers:
>     insert_master_key BEFORE INSERT ON contacts FOR EACH ROW EXECUTE PROCEDURE pg_fct_insert_master_key()
> -----
> 
> -----
> db=> \d lead_requests
>                  Table "db.lead_requests"
>         Column         |            Type             | Modifiers 
> -----------------------+-----------------------------+-----------
>  id                    | numeric(38,0)               | not null
>  contact_id            | numeric(38,0)               | not null
>  request_id            | numeric(38,0)               | not null
>  date_requested        | timestamp without time zone | not null
>  must_update_by        | timestamp without time zone | 
>  date_satisfied        | timestamp without time zone | 
>  status_id             | numeric(38,0)               | 
>  request_scheduled     | timestamp without time zone | 
>  session_log_id        | numeric(38,0)               | 
>  notes                 | character varying(2000)     | 
>  status_last_modified  | timestamp without time zone | 
>  reminder_last_sent    | timestamp without time zone | 
>  data                  | character varying(2000)     | 
>  fulfillment_status_id | numeric(38,0)               | 
> Indexes:
>     "lead_requests_pkey" primary key, btree (id)
>     "lead_requests_contact_id_idx" btree (contact_id)
>     "lead_requests_request_id_idx" btree (request_id)
> Check constraints:
>     "sys_c0049877" CHECK (request_id IS NOT NULL)
>     "sys_c0049876" CHECK (contact_id IS NOT NULL)
>     "sys_c0049878" CHECK (date_requested IS NOT NULL)
> -----
> 
> 


-- 
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2005-06-30 22:43:34
Subject: Re: ported application having performance issues
Previous:From: John MendenhallDate: 2005-06-30 22:24:51
Subject: ported application having performance issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group