[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] MV4.0alpha11 mySQL stragnge behaviour
****** message to minivend-users from Mike Heins <mike@minivend.com> ******
Quoting Christian J. M|ller (cmueller@polinet.ch):
> ****** message to minivend-users from "Christian J. =?iso-8859-1?Q?M=FCller?=" <cmueller@polinet.ch> ******
>
> Installation is MV4.0alpha11 on Linux SuSE 6.3 with mySQL 23.8 alpha.
> I use the following query:
> [page href=scan arg="st=db/sq=select code,isbn,titel,autor,verlag,preis
> from products whrere suchkrit1='Architektur']architektur</A>
> As an initial step, I use only three [item-field ...] tags in the
> results page.
> This query returns 93 results. The display of the [item-field field]
> looks correct.
> My mySQL log, however, shows some 400 queries (!!) as a result. The
> entries are as follows:
>
> 24 Query select * from products WHERE suchkrit1 = 'Architektur' <-- my
> query
> 24 Query select * from products where code = '2038510' <-- MV
> 24 Query select code from products where code = '2038510'
> 24 Query select code from products where code = '2038510'
> 24 Query select code from products where code = '2038510'
> 24 Query select * from products where code = '2357615'
> 24 Query select code from products where code = '2357615'
> 24 Query select code from products where code = '2357615'
> 24 Query select code from products where code = '2357615'
>
> and so on, four entries for each record found with the initial select
> query.
I will check on this, but the real answer is -- don't use [if-item-field ]
.... 8-)
[if-item-param isbn]
[/if-item-param]
will make no additional queries at all.
The product_field() call, which is used in [if-item-field ...], does several
key-existence checks. I will see what I can do to eliminate them.
Maybe this is the time to get rid of [if-item-field ...] and [item-field ...]
entirely and rename them to [if-item-fallthrough ...] or something.
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
Fast, reliable, cheap. 131 Willow Lane, Floor 2 | || _ \
Pick two and we'll talk. Oxford, OH 45056 | || |_) |
-- unknown <mikeh@minivend.com> |___| _ <
513.523.7621 FAX 7501 |_| \_\
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list