Unix Technical Forum

Re: How to improve SQL

This is a discussion on Re: How to improve SQL within the Informix forums, part of the Database Server Software category; --> David McPaul wrote: > Some thoughts. > > How up to date are your statistics? > > Obviously if ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:47 PM
Mark D. Stock
 
Posts: n/a
Default Re: How to improve SQL


David McPaul wrote:

> Some thoughts.
>
> How up to date are your statistics?
>
> Obviously if we can remove the sequential scans we should improve
> performance


I HATE that attitude. It is completely false. Sequential scans are not bad,
if they are appropriate. If you are going to read ALL records from a table,
then the fastest method will be a sequential scan. Also, a dynamic hash
join may be the fastest way to join 2 large tables.

> So what is the size of these 2 tables?


This, and "how many records are you expecting back?", would be good
starting points.

As to the actual problem, I defer to Peter Marley. He is an expert on
extracting and processing data from a Baan database. As he alluded to, Baan
implements a non-relational design in Informix tables, and it makes the
query optimiser as good as useless. For that reason, the use of statistics
has little impact, unless you create your own indexes.

The only thing I would add to Peter's comments is, make sure OPTCOMPIND is
set to 0.

Cheers,
--
Mark.

+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+

sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com