Informix slower than MS Access ?
Posted in 1999
Topics: High Availability & Replication, Backup & Restore, Performance & Tuning, Storage & Space Management, SQL Development & Query Writing, Server Administration, Transactions, Locking & Isolation, Logging & Checkpoints, Networking & sqlhosts Configuration, Platform-Specific Issues, Versions, Editions & End-of-Life
Hello,
is there any help for me and my informix server ???
I have a performance problem with Informix IDS 7.30 UC5 on a SUN Solaris
5.5.1 (one processor with 512 MByte RAM)
There is a table with 14 columns and 1.600.000 Rows.
My Sql-Select is :
SELECT lager, art_nr, SUM(menge)
FROM lag_bew
WHERE art_nr > 99000000
GROUP BY lager, art_nr
HAVING SUM(menge) > 10000
ORDER BY art_nr
The result contains 27 rows and takes 45 seconds ;-(.
The same select on an NT-Server (smaller than the SUN) with Mr. Gates's
Access takes only 25
seconds (Thats true !).
Informix does a sequential scan on the table an needs a temporary file for
group and order by.
The table has only 2 extents.
If i create a index such as (art_nr, lager) or (lager, art_nr) the select
takes over one minute (Thats true also !).
The explain shows that Informix use this index and need no temporary file.
The database has no transactions, the lock mode of the table is page and if
i lock the table in exclusive mode the select is only 2 seconds faster.
Now to the server:
I'm using two cooked files, one for the rootdbs and one for the datadbs on
the same disc-device.
Does the performance increase so much if I'm using raw devices ?
Here is my $ONCONFIG-File:
#**************************************************************************
#
# INFORMIX SOFTWARE, INC.
#
# Title: onconfig.std
# Description: Informix Dynamic Server Configuration Parameters
#
#**************************************************************************
# Root Dbspace Configuration
ROOTNAME rootdbs # Root dbspace nameROOTPATH /DB001/dbs/root_dbs # Path for device containing root
dbspace
ROOTOFFSET 0 # Offset of root dbspace into device
(Kbytes)
ROOTSIZE 400000 # Size of root dbspace (Kbytes)
# Disk Mirroring Configuration Parameters
MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
MIRRORPATH # Path for device containing mirrored root
MIRROROFFSET 0 # Offset into mirrored device (Kbytes)
# Physical Log Configuration
PHYSDBS rootdbs # Location (dbspace) of physical log
PHYSFILE 2000 # Physical log file size (Kbytes)
# Logical Log Configuration
LOGFILES 24 # Number of logical log files
LOGSIZE 8000 # Logical log size (Kbytes)
# Diagnostics
MSGPATH /DB001/informix/online.log # System message log file path
CONSOLE /dev/console # System console message path
ALARMPROGRAM /DB001/informix/etc/log_full.sh # Alarm program pathSYSALARMPROGRAM /DB001/informix/etc/evidence.sh # System Alarm program path
TBLSPACE_STATS 1
# System Archive Tape Device
TAPEDEV /dev/null # Tape device path
TAPEBLK 16 # Tape block size (Kbytes)
TAPESIZE 10240 # Maximum amount of data to put on tape
(Kbytes)
# Log Archive Tape Device
LTAPEDEV /dev/null # Log tape device path
LTAPEBLK 16 # Log tape block size (Kbytes)
LTAPESIZE 10240 # Max amount of data to put on log tape
(Kbytes)
# Optical
STAGEBLOB # Informix Dynamic Server/Optical staging
area
# System Configuration
SERVERNUM 1 # Unique id corresponding to a DynamicServer instance
DBSERVERNAME db_ows # Name of default database server
DBSERVERALIASES db_ows_shm # List of alternate dbservernames
NETTYPE tlitcp,1,, # Configure poll thread(s) for nettype
NETTYPE ipcshm,1,, # Configure poll thread(s) for nettype
DEADLOCK_TIMEOUT 60 # Max time to wait of lock in distributed
env.
RESIDENT 0 # Forced residency flag (Yes = 1, No = 0)
MULTIPROCESSOR 0 # 0 for single-processor, 1 formulti-processor
NUMCPUVPS 1 # Number of user (cpu) vps
SINGLE_CPU_VP 1 # If non-zero, limit number of cpu vps toone
NOAGE 0 # Process aging
AFF_SPROC 0 # Affinity start processor
AFF_NPROCS 0 # Affinity number of processors
# Shared Memory Parameters
LOCKS 150000 # Maximum number of locks
BUFFERS 20000 # Maximum number of shared buffers
NUMAIOVPS # Number of IO vps
PHYSBUFF 32 # Physical log buffer size (Kbytes)
LOGBUFF 16 # Logical log buffer size (Kbytes)LOGSMAX 50 # Maximum number of logical log files
CLEANERS 2 # Number of buffer cleaner processes
SHMBASE 0xa000000 # Shared memory base address
SHMVIRTSIZE 8000 # initial virtual shared memory segment size
SHMADD 8192 # Size of new shared memory segments
(Kbytes)
SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited
CKPTINTVL 120 # Check point interval (in sec)
LRUS 8 # Number of LRU queues
LRU_MAX_DIRTY 10 # LRU percent dirty begin cleaning limit
LRU_MIN_DIRTY 5 # LRU percent dirty end cleaning limit
LTXHWM 50 # Long transaction high water markpercentage
LTXEHWM 60 # Long transaction high water mark
(exclusive)
TXTIMEOUT 0x12c # Transaction timeout (in sec)
STACKSIZE 32 # Stack size (Kbytes)
# System Page Size
# BUFFSIZE - Dynamic Server no longer supports this configuration parameter.
# To determine the page size used by Dynamic Server on your
platform
# see the last line of output from the command, 'onstat -b'.
# Recovery Variables
# OFF_RECVRY_THREADS:
# Number of parallel worker threads during fast recovery or an offline
restore.
# ON_RECVRY_THREADS:
# Number of parallel worker threads during an online restore.
OFF_RECVRY_THREADS 10 # Default number of offline workerthreads
ON_RECVRY_THREADS 1 # Default number of online worker threads
# Data Replication Variables
# DRAUTO: 0 manual, 1 retain type, 2 reverse type
DRAUTO 0 # DR automatic switchover
DRINTERVAL 30 # DR max time between DR buffer flushes (in
sec)
DRTIMEOUT 30 # DR network timeout (in sec)DRLOSTFOUND /DB001/informix/etc/dr.lostfound # DR lost+found file path
# CDR Variables
CDR_LOGBUFFERS 2048 # size of log reading buffer pool (Kbytes)
CDR_EVALTHREADS 1,2 # evaluator threads (per-cpu-vp,additional)
CDR_DSLOCKWAIT 5 # DS lockwait timeout (seconds)
CDR_QUEUEMEM 4096 # Maximum amount of memory for any CDR queue
(Kbytes)
# Backup/Restore variables
BAR_ACT_LOG /tmp/bar_act.log
BAR_MAX_BACKUP 0
BAR_RETRY 1
BAR_NB_XPORT_COUNT 10
BAR_XFER_BUF_SIZE 31
# Informix Storage Manager variables@
How much memory did your NT have? 62M ?
You're limiting the Informix Engine to 20,000 buffers. That means that you are
limiting the total memory space for tables to 40 Meg. With a 512 MB system, you
probably would want to set this to 150,000.
Access works by "loading" the entire table into memory when the table is open.
You could do the same thing by increasing the buffer pool size drastically and
making the table into a memory resident table.
S. Radtke wrote:
> Hello,
>
> is there any help for me and my informix server ???
>
> I have a performance problem with Informix IDS 7.30 UC5 on a SUN Solaris
> 5.5.1 (one processor with 512 MByte RAM)
>
> There is a table with 14 columns and 1.600.000 Rows.
>
> My Sql-Select is :
>
> SELECT lager, art_nr, SUM(menge)
> FROM lag_bew
> WHERE art_nr > 99000000
> GROUP BY lager, art_nr
> HAVING SUM(menge) > 10000
> ORDER BY art_nr>
> The result contains 27 rows and takes 45 seconds ;-(.
>
> The same select on an NT-Server (smaller than the SUN) with Mr. Gates's
> Access takes only 25
> seconds (Thats true !).
>
> Informix does a sequential scan on the table an needs a temporary file for
> group and order by.
> The table has only 2 extents.
>
> If i create a index such as (art_nr, lager) or (lager, art_nr) the select
> takes over one minute (Thats true also !).
> The explain shows that Informix use this index and need no temporary file.
>
> The database has no transactions, the lock mode of the table is page and if
> i lock the table in exclusive mode the select is only 2 seconds faster.
>
> Now to the server:
>
> I'm using two cooked files, one for the rootdbs and one for the datadbs on
> the same disc-device.
> Does the performance increase so much if I'm using raw devices ?
>
> Here is my $ONCONFIG-File:
>
> #**************************************************************************
> #
> # INFORMIX SOFTWARE, INC.
> #
> # Title: onconfig.std
> # Description: Informix Dynamic Server Configuration Parameters
> #
> #**************************************************************************
>
> # Root Dbspace Configuration
>
> ROOTNAME rootdbs # Root dbspace name> ROOTPATH /DB001/dbs/root_dbs # Path for device containing root
> dbspace
> ROOTOFFSET 0 # Offset of root dbspace into device
> (Kbytes)
> ROOTSIZE 400000 # Size of root dbspace (Kbytes)>
> # Disk Mirroring Configuration Parameters
>
> MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
> MIRRORPATH # Path for device containing mirrored root
> MIRROROFFSET 0 # Offset into mirrored device (Kbytes)>
> # Physical Log Configuration
>
> PHYSDBS rootdbs # Location (dbspace) of physical log
> PHYSFILE 2000 # Physical log file size (Kbytes)>
> # Logical Log Configuration
>
> LOGFILES 24 # Number of logical log files
> LOGSIZE 8000 # Logical log size (Kbytes)>
> # Diagnostics
>
> MSGPATH /DB001/informix/online.log # System message log file path
> CONSOLE /dev/console # System console message path
> ALARMPROGRAM /DB001/informix/etc/log_full.sh # Alarm program path> SYSALARMPROGRAM /DB001/informix/etc/evidence.sh # System Alarm program path
> TBLSPACE_STATS 1>
> # System Archive Tape Device
>
> TAPEDEV /dev/null # Tape device path
> TAPEBLK 16 # Tape block size (Kbytes)
> TAPESIZE 10240 # Maximum amount of data to put on tape
> (Kbytes)>
> # Log Archive Tape Device
>
> LTAPEDEV /dev/null # Log tape device path
> LTAPEBLK 16 # Log tape block size (Kbytes)
> LTAPESIZE 10240 # Max amount of data to put on log tape
> (Kbytes)>
> # Optical
>
> STAGEBLOB # Informix Dynamic Server/Optical staging
> area
>
> # System Configuration
>
> SERVERNUM 1 # Unique id corresponding to a Dynamic> Server instance
> DBSERVERNAME db_ows # Name of default database server
> DBSERVERALIASES db_ows_shm # List of alternate dbservernames
> NETTYPE tlitcp,1,, # Configure poll thread(s) for nettype
> NETTYPE ipcshm,1,, # Configure poll thread(s) for nettype
> DEADLOCK_TIMEOUT 60 # Max time to wait of lock in distributed
> env.
> RESIDENT 0 # Forced residency flag (Yes = 1, No = 0)
>
> MULTIPROCESSOR 0 # 0 for single-processor, 1 for> multi-processor
> NUMCPUVPS 1 # Number of user (cpu) vps
> SINGLE_CPU_VP 1 # If non-zero, limit number of cpu vps to> one
>
> NOAGE 0 # Process aging
> AFF_SPROC 0 # Affinity start processor
> AFF_NPROCS 0 # Affinity number of processors>
> # Shared Memory Parameters
>
> LOCKS 150000 # Maximum number of locks
> BUFFERS 20000 # Maximum number of shared buffers
> NUMAIOVPS # Number of IO vps
> PHYSBUFF 32 # Physical log buffer size (Kbytes)
> LOGBUFF 16 # Logical log buffer size (Kbytes)> LOGSMAX 50 # Maximum number of logical log files
> CLEANERS 2 # Number of buffer cleaner processes
> SHMBASE 0xa000000 # Shared memory base address
> SHMVIRTSIZE 8000 # initial virtual shared memory segment size
> SHMADD 8192 # Size of new shared memory segments
> (Kbytes)
> SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited
> CKPTINTVL 120 # Check point interval (in sec)
> LRUS 8 # Number of LRU queues
> LRU_MAX_DIRTY 10 # LRU percent dirty begin cleaning limit
> LRU_MIN_DIRTY 5 # LRU percent dirty end cleaning limit
> LTXHWM 50 # Long transaction high water mark> percentage
> LTXEHWM 60 # Long transaction high water mark
> (exclusive)
> TXTIMEOUT 0x12c # Transaction timeout (in sec)
> STACKSIZE 32 # Stack size (Kbytes)>
> # System Page Size
> # BUFFSIZE - Dynamic Server no longer supports this configuration parameter.
> # To determine the page size used by Dynamic Server on your
> platform
> # see the last line of output from the command, 'onstat -b'.
>
> # Recovery Variables
> # OFF_RECVRY_THREADS:
> # Number of parallel worker threads during fast recovery or an offline
> restore.
> # ON_RECVRY_THREADS:
> # Number of parallel worker threads during an online restore.
>
> OFF_RECVRY_THREADS 10 # Default number of offline worker> threads
> ON_RECVRY_THREADS 1 # Default number of online worker threads>
> # Data Replication Variables
> # DRAUTO: 0 manual, 1 retain type, 2 reverse type
> DRAUTO 0
Hi,
first of all, writes to cooked files are up to 10 times slower
than to raw devices. Your query will create a temporary file,
even if you create an index on the column art_nr. Therefore
I expect writes to your /tmp directory. You didn't set DBSPACETEMP,
so the temporary file will be created in your /tmp directory.
Do the following:
create index lag_bew01 on lag_bew( art_nr ) in datdbs;
update statistics for table lag_bew;
Now, force the system not to create temporary file by
setting your DS_TOTAL_MEMORY configuration parameter to
an appropriate value ( depends on the size of the group
by result ).
i.e.
DS_TOTAL_MEMORY 40000
and modify your Read-Ahead Pages parameter:
RA_PAGES 32
RA_THRESHOLD 16
re-start your Informix server and insert the
pdq-statement.
set pdqpriority 90;
SELECT lager, art_nr, SUM(menge)
FROM lag_bew
WHERE art_nr > 99000000
GROUP BY lager, art_nr
HAVING SUM(menge) > 10000
ORDER BY art_nr;
If your query will still take longer than the one running
on the Access system, measure your disk speed on the SUN platform.
Additionally send us the ouput of "oncheck -pT yourdatabase:lag_bew".
Best regards,
Stefan Weideneder
PS: Wir können uns auch auf Deutsch weiter unterhalten.
S. Radtke wrote:
>
> Hello,
>
> is there any help for me and my informix server ???
>
> I have a performance problem with Informix IDS 7.30 UC5 on a SUN Solaris
> 5.5.1 (one processor with 512 MByte RAM)
>
> There is a table with 14 columns and 1.600.000 Rows.
>
> My Sql-Select is :
>
> SELECT lager, art_nr, SUM(menge)
> FROM lag_bew
> WHERE art_nr > 99000000
> GROUP BY lager, art_nr
> HAVING SUM(menge) > 10000
> ORDER BY art_nr>
> The result contains 27 rows and takes 45 seconds ;-(.
>
> The same select on an NT-Server (smaller than the SUN) with Mr. Gates's
> Access takes only 25
> seconds (Thats true !).
>
> Informix does a sequential scan on the table an needs a temporary file for
> group and order by.
> The table has only 2 extents.
>
> If i create a index such as (art_nr, lager) or (lager, art_nr) the select
> takes over one minute (Thats true also !).
> The explain shows that Informix use this index and need no temporary file.
>
> The database has no transactions, the lock mode of the table is page and if
> i lock the table in exclusive mode the select is only 2 seconds faster.
>
> Now to the server:
>
> I'm using two cooked files, one for the rootdbs and one for the datadbs on
> the same disc-device.
> Does the performance increase so much if I'm using raw devices ?
>
> Here is my $ONCONFIG-File:
Related threads
- onbar -c -F in Windows Informix instance
- Anyone... SQLCODE=-668, ISAM error=-1
- Not using the 100% logical log page size alloacted to informix