pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vernon Wu <vernonw@gatewaytech.com>
To: pgsql-performance@postgresql.org
Subject: How good I can get
Date: Tue, 14 Jan 2003 11:42:07 -0800
Message-ID: <65TWVMK3ZVRRMF0DYTHF74KGKE08CA.3e24680f@kimiko> (raw)

In my current project, among of over twenty main tables, three of them are the master tables and result are the 
multivalued detail tables. All of those table have the field name userid which is varchar data type.

A selection statement, having a level of subquery, can involve up to twenty tables. After some query statement tuning 
and indexing (on all of the multivalued field of all the detail table), a query performance improves spectacularly. The 
following is the output of  ?explain analyze? on a query involved ten tables.

NOTICE:  QUERY PLAN:

Result  (cost=0.00..23.42 rows=1 width=939) (actual time=28.00..28.00 rows=0 loops=1)
. . .
Total runtime: 31.00 msec

I would like to find any performance improvement potentiality in terms of DB table design (indexing always can be done 
later). The first thing I know I can do is to change the join key, userid, to numeral. Since implementing the change 
requests some work on the system, I would like to know how significant performance improement it can bring.

Almost all fields of those tables are a single digit character. I can guess that change them to number type also can 
improve the selection performance. My question again is how much it can get. The application is a web application. All 
data on a page is a string, or text type. All number type data  has to be parsed from a string to the back-end, and 
converted into a string from the back end. So that change will have performance overhead on the application.

Thanks for your input.

Vernon 
     
 





Message-ID: <65TWVMK3ZVRRMF0DYTHF74KGKE08CA.3e24680f@kimiko>
Permalink:  ../65TWVMK3ZVRRMF0DYTHF74KGKE08CA.3e24680f@kimiko/
Also on:    postgresql.org/message-id/65TWVMK3ZVRRMF0DYTHF74KGKE08CA.3e24680f@kimiko

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: vernonw@gatewaytech.com
  Subject: Re: How good I can get
  In-Reply-To: <65TWVMK3ZVRRMF0DYTHF74KGKE08CA.3e24680f@kimiko>
  References: <65TWVMK3ZVRRMF0DYTHF74KGKE08CA.3e24680f@kimiko>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox