[ic] Order search memory use

Jon Jensen jon at endpoint.com
Fri Dec 3 17:19:51 EST 2004

On Fri, 3 Dec 2004, Chris Ochs wrote:

> From reading the archives it appears that when you click on the orders
> button it loads all the orders into memory.  For a couple of our clients
> this results in an interchange process that grows to 160 mb of ram when
> clicking on the orders button.  This is with approximately 20,000 entries in
> the transactions table and 80,000 entries in the orderline table.  I
> switched these catalogs over to using postgresql from the default dbm files
> and it didn't make a difference either, other than better performance
> overall, but no change in memory use.  Is there a way to change this
> behavior?  The only thing I can think of is finding the query and inserting
> a limit statement.  This would prevent browsing the entire range of orders I
> presume, but would still let them look up specific orders.
> Any suggestions?

If you're using PostgreSQL, one thing you can do is create a view of your
orders table that only includes certain orders: pending status, or less
than 30 days old, not archived, etc. Then have the admin use that view to
display your orders, instead of the table directly.

There are other ways to do it, but this way has the nice side-effect of 
being easy to reuse in various places you want to have the same "current 
orders" type display, whether in Interchange or not.

If you don't need to see any orders on that initial page at all, you can
set the database attribute in Interchange's catalog.cfg (or the
appropriate included file) to LARGE, like this:

Database transactions LARGE 1

Then restart Interchange, and the admin will not show all rows by default,
but will still let you search.


Jon Jensen
End Point Corporation
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...

More information about the interchange-users mailing list