🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #466

Re: Performance issue of group by clause.

#466
From: Craig Stuntz TeamB
Date: Thu, 29 Nov 2007 13:18
27 lines
2160 bytes
Monalee Bhandge wrote:

>    Even I create index on dr_amt, cr_amt, acc_name columns then also
> I doesn't get that much speed.

	No, it won't, because indices tend to make GROUP BY slower. 

	GROUP BY orders the result set, then returns selected rows while
computing aggregates.

	An index typically makes returning an ordered result set *slower.*

	OTOH, an index on acc_name might help reduce the number of rows which
must be examined (presuming that there are > 4 values of acc_name in
the real data, that is).

> In this table there are 90,00000 rows.

	I'm not sure what this means. I don't recognize that as a number. 

	What is the actual problem you are trying to solve?

-- 
Craig Stuntz [TeamB] � Vertex Systems Corp. � Columbus, OH
  Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Everything You Need to Know About InterBase Character Sets:
  http://blogs.teamb.com/craigstuntz/articles/403.aspx
Technical Details
Message-ID: <474eca51$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!feeder3.cambrium.nl!feeder2.cambrium.nl!feeder6.cambrium.nl!feed.tweaknews.nl!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <474eb557$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,5460ac00bbec9e3
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII
From: "Craig Stuntz [TeamB]" <craig_stuntz@nospam.please [a.k.a. acm.org]>
Subject: Re: Performance issue of group by clause.
Newsgroups: borland.public.interbase.sql
References: <474eb557$1@newsgroups.borland.com>
Organization: Vertex Systems Corporation
User-Agent: XanaNews/1.18.1.9
X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ:0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 64.199.116.234
Message-ID: <474eca51$1@newsgroups.borland.com>
Date: 29 Nov 2007 06:18:57 -0700
X-Trace: newsgroups.borland.com 1196345937 64.199.116.234 (29 Nov 2007 06:18:57 -0700)
Lines: 27
X-Authenticated-User: cstuntz
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!feeder3.cambrium.nl!feeder2.cambrium.nl!feeder6.cambrium.nl!feed.tweaknews.nl!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail