[program-l] Re: question about memory and sql

  • From: Yuma Decaux <jamyad7@xxxxxxxxx>
  • To: "program-l@xxxxxxxxxxxxx" <program-l@xxxxxxxxxxxxx>
  • Date: Thu, 1 Nov 2018 21:46:13 +1000

Hey thanks for the confirmation.

There are about 10 tables and 3 of them are relatively large (180k + entries).

The where clauses are restrictive enough in that they will always return a 
maximum of 4k entries (not all, just 1 or 2) just once, then are processed 
elsewhere, and the rest will work on single entry to 10 entry returns from a 
variety of clauses.

I've indexed all the tables and made the ER quite optimal so processing times 
stay within 0.001 to 0.02 seconds which is better than when I was using csv 
tables so I think this will suffice, and I can concentrate on optimising other 
sub components of my architecture.

Cheeriozo 



On 1 Nov 2018, at 9:39 pm, Taksan <taksantong@xxxxxxxxx> wrote:

You are correct. I just want to add an extra detail: some programming
languages use some database libraries, that,if not used correctly, may
load an entire table into memory when you try to access them. Also, if
your sql is not properly defined with a good "where" clause you may be
getting too much data..... so you are correct in a "general" sense,
but if you want a more specific answer you may need to provide more
specific details on what you are doing.

On 11/1/18, Dzhovani <dzhovani.chemishanov@xxxxxxxxx> wrote:
Yes, only indexes and cache would be loaded in the ram.

Is your app required to work offline?

On 1.11.2018 г. 12:45, Yuma Decaux wrote:
Hey all,

I'm sure this is also relevant to sqlite, but here goes.

When opening a connection to an sql/sqlite database, I am not having the
entire database loaded to memory, and the queries and results are purged
when I close the connection. Am I correct in assuming this?

Just asking as I have a rather large database I am fitting on a smartphone
app, though I have minimised the load, and just want to Mae sure my above
assumption is correct.

Any help greatly appreciated


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: