Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 21
Registered: ‎01-13-2011
My Device: 9700 / Playbook
My Carrier: Vodafone
Accepted Solution

SQLite and OS7

Hi @ll,

 

I have a big SQLite Performance problem:

 

the following SQL

 

SELECT KKL_KundenNr,KKL_ArtNrIntern,Artikelstamm.Artikelstamm_ArtNrExtern AS KKL_ArtNrExtern,Artikelstamm.Artikelstamm_AGX AS KKL_AGX,KKL_ID,KKL_BA, CASE WHEN KKL_ArtBez IS NULL OR LENGTH(KKL_ArtBez) = 0 THEN (SELECT Artikelstamm_ArtBez FROM Artikelstamm WHERE Artikelstamm_ArtNrIntern = KKL_ArtNrIntern) ELSE KKL_ArtBez END AS KKL_ArtBez,KKL_PS,KKL_Verkaufspreis,KKL_RabattProz,KKL_TeuerungszuschlagProz,KKL_LetzteMenge,KKL_PAK,KKL_DLV,KKL_MengeGesamt,KKL_PosGesamt,KKL_WertGesamt,KKL_unterLimitPreis,Artikelstamm.Artikelstamm_ID AS KKL_ARTIKELSTAMM_ID,KKL_LastModified FROM KKL JOIN Artikelstamm ON KKL_ArtNrIntern = Artikelstamm_ArtNrIntern WHERE KKL_KundenNr = 999999

 

returns a dynaset of 1100 records. Moving through the dynaset with a cursor runs in OS6 0-2 msec. per record. In OS7 the same operation runs round about 600 msec!!! (I used the Simultors). If I run the App on a real device, I must pull the battery after ~5 hours!!

 

Any idea or experiences with this??

 

Thx.

 

 

Contributor
Posts: 21
Registered: ‎01-13-2011
My Device: 9700 / Playbook
My Carrier: Vodafone

Re: SQLite and OS7

OK... I solved it by changing the tables in FROM / JOIN:

 

OLD:

...FROM KKL JOIN Artikelstamm ON KKL_ArtNrIntern = Artikelstamm_ArtNrIntern ...

 

NEW:

...FROM Artikelstamm JOIN KKL ON Artikelstamm_ArtNrIntern = KKL_ArtNrIntern...

 

Table Artikelstamm has less records then table KKL. I'm still wondering, why this is not necessary in OS6!!