[ic] Memory problem

Jon Jensen interchange-users@interchange.redhat.com
Tue Jan 15 15:01:01 2002


On Tue, 15 Jan 2002, Peter Jakl wrote:

> I've traced thru the interchange server program and found out my memory
> problem but need help as to why it is doing this. Without going into
> great detail, a startup function attempts to load the database into
> memory (opendatabase() ultimately calls import_database() for each table
> including products). The problem is that my products table has over
> 150,000 products and the interchange server is loading all the products
> into memory. How do I stop this?

You may have mentioned which database you're using in a previous message,
but I don't remember right now. Using MySQL on an already-imported
database, here are the SQL commands Interchange issues at IC daemon
startup time:

SHOW TABLES
select * from country limit 1
select * from gift_certs limit 1
select * from userdb limit 1
select * from options limit 1
select * from affiliate limit 1
select * from cat limit 1
select * from pricing limit 1
select * from state limit 1
select * from area limit 1
select * from merchandising limit 1
select * from orderline limit 1
select * from inventory limit 1
select * from order_returns limit 1
select * from transactions limit 1
select * from products limit 1

This lets IC get all the column names, but LIMIT 1 keeps the database from
wasting any effort collecting a large result set.

Not all databases support LIMIT, so that may be the problem you're having.

Jon