[ic] flypage / IC efficiency?

Jon Jensen jon at endpoint.com
Mon Sep 19 19:14:07 UTC 2016

On Mon, 19 Sep 2016, IC wrote:

>> [item-field] tag. It does a new SQL query for every invocation by 
>> design;
> Why? Surely this is insane?

I wasn't there ca. 1996 or 1997 when it was introduced, but I suspect the 
reason is that [item-field] it predates Interchange using SQL databases at 
all. At that time it used only flat files or DBM-like files, and plucking 
each value out as requested was actually more efficient because you 
fetched only what you need, when you needed it, and there was no external 
database inefficiency in looking up individual fields.

> The whole IC distribution, even the latest version is littered with the 
> item and item-field tag, what is the point in designing a tag that is so 
> inefficient, in most cases it retrieves or checks a single item of data, 
> hence has to be used multiple times but uses 2 sql queries to do it.

Patches are welcome if you would like to improve the efficiency of the 
demo sites that come with Interchange!

Most of us running serious ecommerce sites using Interchange use very 
little of that demo code, and replace it with customized code, not just 
for efficiency but to suit our use cases. Thus no busy site I and most 
others work with uses [item-field] for much of anything.

> I can get every item of data I need for the flypage from a single query 
> with left joins.

That is what I recommend you do. :)


Jon Jensen
End Point Corporation

More information about the interchange-users mailing list