pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to speed up the database query?
6+ messages / 6 participants
[nested] [flat]

* How to speed up the database query?
@ 2005-10-27 07:03  Abdul Wahab Dahalan <wahab@mimos.my>
  0 siblings, 4 replies; 6+ messages in thread

From: Abdul Wahab Dahalan @ 2005-10-27 07:03 UTC (permalink / raw)
  To: pgsql-sql

Hi everyone!

I'm looking for solution to speed up the database query, means that to get resultset as quicker as we can.

For example if I've 700 records in the table it will take longer time compared if I've only 20 records. How do we speed up the query?. Any query technique that can be applied?.

Thus wild card query like : select * from tableA will cause query time increased compare to say select a,b from tableA.

any help, prettymuch appreciated.




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to speed up the database query?
@ 2005-10-27 07:38  Amit_Wadhwa@Dell.com
  0 siblings, 0 replies; 6+ messages in thread

From: Amit_Wadhwa@Dell.com @ 2005-10-27 07:38 UTC (permalink / raw)
  To: wahab@mimos.my; pgsql-sql

Run an analyse on your query, create your indexes according to that, and
you have a better performing query. 
Getting a resultset display faster will depend on your driver/RAM/client

-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Abdul Wahab Dahalan
Sent: Thursday, October 27, 2005 12:34 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] How to speed up the database query?

Hi everyone!

I'm looking for solution to speed up the database query, means that to
get resultset as quicker as we can.

For example if I've 700 records in the table it will take longer time
compared if I've only 20 records. How do we speed up the query?. Any
query technique that can be applied?.

Thus wild card query like : select * from tableA will cause query time
increased compare to say select a,b from tableA.

any help, prettymuch appreciated.


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to speed up the database query?
@ 2005-10-27 07:44  Andreas Kretschmer <akretschmer@spamfence.net>
  parent: Abdul Wahab Dahalan <wahab@mimos.my>
  3 siblings, 0 replies; 6+ messages in thread

From: Andreas Kretschmer @ 2005-10-27 07:44 UTC (permalink / raw)
  To: pgsql-sql

Abdul Wahab Dahalan <wahab@mimos.my> schrieb:

> Hi everyone!
> 
> I'm looking for solution to speed up the database query, means that to
> get resultset as quicker as we can.

09:41 < akretschmer> ??tuning
09:41 < rtfm_please> For information about tuning
09:41 < rtfm_please> see http://www.powerpostgresql.com
09:41 < rtfm_please> or http://www.powerpostgresql.com/PerfList
09:41 < rtfm_please> or http://www.varlena.com/varlena/GeneralBits/116.php


> 
> For example if I've 700 records in the table it will take longer time
> compared if I've only 20 records. How do we speed up the query?. Any
> query technique that can be applied?.

Read the links above. You should use Indexe for searching. And you
should use 'explain select ...' to see how the planer works.

09:43 < akretschmer> ??explain
09:43 < rtfm_please> For information about explain
09:43 < rtfm_please> see http://techdocs.postgresql.org/oscon2005/robert.treat/OSCON_Explaining_Explain_Public.sxi
09:43 < rtfm_please> or http://www.gtsm.com/oscon2003/toc.html
09:43 < rtfm_please> or http://www.postgresql.org/docs/current/static/sql-explain.html


Regards, Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to speed up the database query?
@ 2005-10-27 15:45  Christian Paul B. Cosinas <cpc@cybees.com>
  parent: Abdul Wahab Dahalan <wahab@mimos.my>
  3 siblings, 0 replies; 6+ messages in thread

From: Christian Paul B. Cosinas @ 2005-10-27 15:45 UTC (permalink / raw)
  To: 'Abdul Wahab Dahalan' <wahab@mimos.my>; pgsql-sql

Of course as long as your table increases its records, the longer will take
your query.

I think what you want is to minimize the run time even though you have large
tables. You should fine tune your database server (which I am still looking
for the best configuration for my server haha). And get the most logical
queries. Avoid unnecessary queries.

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Abdul Wahab Dahalan
Sent: Thursday, October 27, 2005 7:04 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] How to speed up the database query?

Hi everyone!

I'm looking for solution to speed up the database query, means that to get
resultset as quicker as we can.

For example if I've 700 records in the table it will take longer time
compared if I've only 20 records. How do we speed up the query?. Any query
technique that can be applied?.

Thus wild card query like : select * from tableA will cause query time
increased compare to say select a,b from tableA.

any help, prettymuch appreciated.


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html    




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to speed up the database query?
@ 2005-10-27 16:31  Bruno Wolff III <bruno@wolff.to>
  parent: Abdul Wahab Dahalan <wahab@mimos.my>
  3 siblings, 0 replies; 6+ messages in thread

From: Bruno Wolff III @ 2005-10-27 16:31 UTC (permalink / raw)
  To: Abdul Wahab Dahalan <wahab@mimos.my>; +Cc: pgsql-sql

On Thu, Oct 27, 2005 at 15:03:36 +0800,
  Abdul Wahab Dahalan <wahab@mimos.my> wrote:
> Hi everyone!
> 
> I'm looking for solution to speed up the database query, means that to get resultset as quicker as we can.
> 
> For example if I've 700 records in the table it will take longer time compared if I've only 20 records. How do we speed up the query?. Any query technique that can be applied?.
> 
> Thus wild card query like : select * from tableA will cause query time increased compare to say select a,b from tableA.
> 
> any help, prettymuch appreciated.

Why don't you run explain analyze on the real query you are trying to speed up
and show us the output along with the query and relevant table and view
definitions.

Yes, specifying fewer columns will probably significantly speed things up,
as you will be transmitting less data over the network. There aren't magic
ways to speed up queries return every row in a table.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to speed up the database query?
@ 2005-10-27 17:46  Jim C. Nasby <jnasby@pervasive.com>
  parent: Abdul Wahab Dahalan <wahab@mimos.my>
  3 siblings, 0 replies; 6+ messages in thread

From: Jim C. Nasby @ 2005-10-27 17:46 UTC (permalink / raw)
  To: Abdul Wahab Dahalan <wahab@mimos.my>; +Cc: pgsql-sql

Have you taken a look at
http://www.postgresql.org/docs/8.0/interactive/performance-tips.html ?

On Thu, Oct 27, 2005 at 03:03:36PM +0800, Abdul Wahab Dahalan wrote:
> Hi everyone!
> 
> I'm looking for solution to speed up the database query, means that to get resultset as quicker as we can.
> 
> For example if I've 700 records in the table it will take longer time compared if I've only 20 records. How do we speed up the query?. Any query technique that can be applied?.
> 
> Thus wild card query like : select * from tableA will cause query time increased compare to say select a,b from tableA.
> 
> any help, prettymuch appreciated.
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
> 

-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2005-10-27 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27 07:03 How to speed up the database query? Abdul Wahab Dahalan <wahab@mimos.my>
2005-10-27 07:44 ` Andreas Kretschmer <akretschmer@spamfence.net>
2005-10-27 15:45 ` Christian Paul B. Cosinas <cpc@cybees.com>
2005-10-27 16:31 ` Bruno Wolff III <bruno@wolff.to>
2005-10-27 17:46 ` Jim C. Nasby <jnasby@pervasive.com>
2005-10-27 07:38 Re: How to speed up the database query? Amit_Wadhwa@Dell.com

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