cancel
Showing results for 
Search instead for 
Did you mean: 

Ultralite Interactive SQL Hangs on query with version 12.0.1.3840

Former Member
0 Kudos
2,329

Hi all,

If you can help me, I'm not able to discover why this query below hangs ("fetching rows...") when accessing this ultralite database: http://www.4shared.com/file/Jj_LbFd-/ESP_pcom.html with Interactive SQL.

SELECT distinct top 100 price.code, price.product, "table", fobPrice, cifPrice, descount, cost,      MaximumDiscount, MinimumQuantity, QuantityMultiplier, UnitOfMeasure.Code as UOMCode, UnitOfMeasure.Name as UOMName, Product.description, Product.displaystock, Product.reference, Product.special, ProductStock.Stock, Packing FROM price inner join UnitOfMeasure on price.UnitOfMeasure = UnitOfMeasure.Code INNER JOIN Product ON price.Product = Product.Code LEFT OUTER JOIN ProductStock ON ProductStock.Product = price.Product AND price.UnitOfMeasure = ProductStock.UnitOfMeasure 
WHERE description LIKE 'lixa%' AND "table" = 1 AND Product.status = 'A' 
ORDER BY Product.reference

What is weird is that if I change the like clause to '%lixa' (witch should be worse) instead of 'lixa%', the query runs OK.

This problem started when I upgraded to version 12.0.1.3840. With version 12.0.1.3352 the query run normally.

Thanks in advance

Aderval Mendonça

Accepted Solutions (0)

Answers (1)

Answers (1)

chris_keating
Product and Topic Expert
Product and Topic Expert

Dropping and recreating the index index_product1 resolves the pegged CPU that was the hang behaviour. The drop causes the query to use the index index_product4. As an aside, the like "%lixa" query plan uses the primary key index to resolve the query.

Former Member
0 Kudos

It worked!! Thank you very much!!!