It is currently Wed May 22, 2013 9:09 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Updated SQLite Library?
PostPosted: Fri Jan 13, 2012 7:36 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Feb 17, 2010 12:00 am
Posts: 976
Location: Anderson Island, WA
USCode wrote:
jassing wrote:
I was just asking if that could be part of the sqlite library in PB... sorry if my request was improper.

No need to say sorry. It doesn't hurt to ask, all Fred can do is say "No". :wink:


Oh, I didn't realize that it was an automatic no... pisser - I'll convert to compiling & using a dll then.

thanks.


Top
 Profile  
 
 Post subject: Re: Updated SQLite Library?
PostPosted: Sun Jan 15, 2012 8:06 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 5:05 pm
Posts: 1693
Location: Norway
No need to get snippy. Fred did explain why this will not be changed at this point. more work to implement/maintain sqlite for purebasic and worse performance for PureBasic SQLite.

Also "delete from mytable order by fieldA limit 10", is fieldA numbers that are increasing? Or timestamps?
If they are timestamps then you can just take current time - some time, and then do a WHERE to delete anything older than some time.
If they are increasing entry numbers with no gaps, then simply track the first and last numbers.
If lastnumber-firstnumber>somenumber then to a delete with a WHERE that is firstnumber+10, that will delete the 10 oldest.

For a programmer there are usually multiple solutions to most problems.

Also remember that you may periodically need to use the VACUUM command to actually reclaim space as sqlite may not always resize a table after something has been deleted. (performance design).

Alternatively you could simply replace/overwrite old entries.

Do some speed tests with the various methods I've described here and see which gives you the best performance.

_________________
Image website, journal, projects, reviews and more.
Normality exist in the minds of others, not mine! - Rescator


Top
 Profile  
 
 Post subject: Re: Updated SQLite Library?
PostPosted: Sun Jan 15, 2012 1:32 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Feb 17, 2010 12:00 am
Posts: 976
Location: Anderson Island, WA
I went ahead and compiled my own sqlite3.lib -- works fine, no performance hit.
thanks.


Top
 Profile  
 
 Post subject: Re: Updated SQLite Library?
PostPosted: Tue Feb 12, 2013 4:51 pm 
Offline
User
User
User avatar

Joined: Sun Dec 17, 2006 5:30 pm
Posts: 44
Location: Milwaukee, WI, USA
Can you share how you did it or the library? We are having an issue with earlier versions (like 3.7.9) of SQLite (the current compile version for v5.0 of PB). We need 3.7.13 or better.

Any help is appreciated. This is a commercial project we are working on.

Thanks

_________________
- DB


Top
 Profile  
 
 Post subject: Re: Updated SQLite Library?
PostPosted: Wed Feb 13, 2013 4:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Feb 17, 2010 12:00 am
Posts: 976
Location: Anderson Island, WA
purebuilt wrote:
Can you share how you did it or the library? We are having an issue with earlier versions (like 3.7.9) of SQLite (the current compile version for v5.0 of PB). We need 3.7.13 or better.

Any help is appreciated. This is a commercial project we are working on.

Thanks


Well; the current version (5.10, b6) has an updated library -- how I did it was grab the amalgamation and changed/added #define's to enable the features I wanted, and built a library using (I think) Pelle's C or Watcom C. However, when I tried (before Fred updated the library) I kept getting errors in PB at link time about missing functions, that were not missing...

So, I would grab the latest lib from the beta and copy that over to your v5 lib.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: uwekel and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye