[ic] Improve speed on retrieving data

Dan Browning interchange-users@interchange.redhat.com
Fri Jan 11 16:41:00 2002


> > > I have an important deadline and need help desperately. I
> > > apologize for
> > > not researching this if this is simple.
> > >
> > > I basically have the following:
> > >
> > > [query st=db list=1 more=1 ml=20 sql='select sku from 
> products where
> > > ...']
> > >
> > > The select is doing a sloooow keyword search on a database
> > > with 179,000
> > > products. I'm using mysql. I have a much faster method of
> > > generating the
> > > list of skus, but need to run an external command.
> > >
> > > Is there some way to run this command to generate the 
> list of skus,
> > > while preserving the "more" and "list" feature?
> > >
> > > TIA!!
> > >
> > > Peter
> > 
> > You can run external commands with a global usertag.  See 
> archives for
> > [encrypt] as an example.
> > 
> > However, if you are saying that the query is slow in IC but 
> fast when
> > executed directly in mysql, maybe you should try today's CVS as it
> > removes the need for specifying rf="" so that IC doesn't 
> have to do a
> > select * (which may be what is happening to cause the 
> slowdown in your
> > query).
> > 
> 
> The query is slow because there's just too many rows to 
> process against
> a single keywords field. I have an external command that is a fast
> search engine that can return the results almost immediately 
> but need to
> tie it into the "more" and "list" capabilities of interchange.
> 
> The [encrypt] tag shows how to simply run something external as a
> filter. Not helpful in this situation that I can see because 
> of the need
> to use the "more" and "list" features.
> 
> If anyone knows a method to do this, I'd appreciate it.
> 
> Peter

Perhaps your program can return a faster query?  

[query sql="[run_cmd ...]" ] 

Of course, that would only be helpful if the main point of your external
command was to restrict the query to certain specific products.
Otherwise, I think you be hacking the IC core.  Sounds like fun.  

+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Dan Browning, Sr. Tech Consultant
| Kavod Technologies, 1498 SE Tech Center Pl Ste 170
| Vancouver, WA 98683  <dan.browning@kavod.com>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Good advice is something a man gives when he is too old to set a bad
example.
		-- La Rouchefoucauld