Re: ported application having performance issues - Mailing list pgsql-performance

From Joshua D. Drake
Subject Re: ported application having performance issues
Date
Msg-id 42C473BA.9090305@commandprompt.com
Whole thread Raw
In response to ported application having performance issues  (John Mendenhall <john@surfutopia.net>)
Responses Re: ported application having performance issues
List 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/

pgsql-performance by date:

Previous
From: John Mendenhall
Date:
Subject: ported application having performance issues
Next
From: Tom Lane
Date:
Subject: Re: ported application having performance issues