Re: [sqlite] Any limitation of file size on sqlite?

2012-12-16 Thread Alexey Pechnikov
Hello!

Sqlite databases 10Gb+ sizes work fine for me in multi-user web environment
and 100Gb+ sizes were tested in my scenarios. The unsupported index
compression is the main problem and so use more scalable FTS4 index when
possible.

Best regards, Alexey.
http://pechnikov.tel
17.12.2012 0:03 пользователь "Çağlar Orhan"  написал:

> Hello again,
> Thank you Simon.
> The page http://www.sqlite.org/limits.html has my answer partly. In MS IIS
>  what gbytes bigger size of .sqlite file should significant to work on it
> properly?
> I mean, is there a 10-12 GB sqlite file that working properly and with any
> problem?
> Thanks
> Caglar
>
> --
> facta non verba
> ordo ab chao
> to code or not to code...
> Follow me (twitter.com/caglaror)
> Biz Contacts for LinkedIn Wellcome
> Script Works www.co-scripts.com
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General setup on Mac OSX 10.7

2012-12-16 Thread Tim Johnson
* Simon Slavin  [121216 15:07]:
> 
> On 16 Dec 2012, at 11:10pm, Tim Johnson  wrote:
> 
> > I've recently set up drupal on my workstation which is hosting Mac
> > OSX 10.7. I would welcome
> > 1)Recommendations on what I should install to manage sqlite
> > 2)How they should be installed
> >  NOTE: macports works well for me but alternative suggestions are
> >  welcomed.
> > The macports list re sqlite can be seen here :
> > http://www.macports.org/ports.php?by=name=sqlite
 
> While as a Linux-user you expect to see DarwinPorts, MacPorts,
> Fink, Homebrew and/or other package managers, it might help to
> know that Mac-users don't think in those terms.
  :) Well this mac user users a generous portion of macports.
  postfix, fetchmail, mutt, procmail, mc and vim to name some..
  But I got macvim as a stand-alone install for the gui version of
  vim. I am actually pretty new to mac going on a year now.
  (12 years on linux)

> There is almost no library-sharing on Macs.  The two big
> collections of shared libraries are the ones which Apple supplies
> with OS X and the ones which Microsoft supplies with its Office
> suite.  Normal professional and hobby programmers will use Apple's
> libraries intensively, and never use Microsoft's libraries unless
> they're specifically interfacing with Microsoft's stuff.  A
> mundane Mac user hit with "This app requires jcrak and visdis."
> wouldn't know what to do about it.
  Yeah, I've got that, after years on linux  
<...> 
> SQLite on a Mac has standard Mac behaviour here.  As a programmer
> you aren't expected to use a library.  You can download up-to-date
> source files for SQLite 'Amalgamated' version from the SQLite
> server
 
> 
  Oh good! Thank you. 
<...>
> But actually SQLite is used so much on Macs that Apple included a
> copy of the shell tool with the OS.  You'll find a copy of the
> sqlite3 shell tool as
 
> /usr/bin/sqlite3
  Duh. I didn't even think to look and thar she blows ... 

> Apple's Developer Tools installations include copies of the .h and
> .c files (many many copies of the .h file) but I recommend that
> you just grab new ones from the SQLite server whenever you start a
> new project.  That way you get all the recent features and
> bugfixes.
  Good tip.
  And I have python with sqlite3 as a module in the standard
  distro

  Thanks again. I really appreciate the tips.
  Your entire email is going into my knowledgebase.
  I owe you a beer.
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] ordering result sets

2012-12-16 Thread Igor Tandetnik
e-mail mgbg25171  wrote:
> I have modified my program to have next time (not shown) as well as next
> date
> What I'd to know is...
> How do I order results firstly by earlest non-null/empty string next time
> (ALL DAYS HERE WILL BE TODAY) order and then BY earliest non-null/empty
> string nextdate order
> so...
> I end up with a list of records in call time order followed by a list of
> records beginning with the one called longest ago.

I'm not sure I completely understand the requirement, but play with something 
like this:

order by (f.nexttime is null or f.nexttime=''), coalesce(f.nexttime, ''), 
f.lastdate

The first expression is boolean, its result is 0 or 1, so what it does is 
separate all records into two groups, and sort the first one (the one for which 
the expression is false) ahead of the second one (where the expression is 
true). The other two expressions are each designed to sort one of these groups 
without affecting the other.
-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General setup on Mac OSX 10.7

2012-12-16 Thread Simon Slavin

On 16 Dec 2012, at 11:10pm, Tim Johnson  wrote:

> I've recently set up drupal on my workstation which is hosting Mac
> OSX 10.7. I would welcome
> 1)Recommendations on what I should install to manage sqlite
> 2)How they should be installed
>  NOTE: macports works well for me but alternative suggestions are
>  welcomed.
> The macports list re sqlite can be seen here :
> http://www.macports.org/ports.php?by=name=sqlite

While as a Linux-user you expect to see DarwinPorts, MacPorts, Fink, Homebrew 
and/or other package managers, it might help to know that Mac-users don't think 
in those terms.

There is almost no library-sharing on Macs.  The two big collections of shared 
libraries are the ones which Apple supplies with OS X and the ones which 
Microsoft supplies with its Office suite.  Normal professional and hobby 
programmers will use Apple's libraries intensively, and never use Microsoft's 
libraries unless they're specifically interfacing with Microsoft's stuff.  A 
mundane Mac user hit with "This app requires jcrak and visdis." wouldn't know 
what to do about it.

Normal Mac programmers generally statically link libraries and include copies 
of them (as .dylib files, or whole frameworks) as part of their application 
bundles.  Almost nobody shares copies of libraries because the original reason 
for doing so has gone.  You have to include an extra 1.1Meg of stuff with your 
application ?  Your users have to find an extra 1.1Meg of disk space and it'll 
take them an extra six seconds to download it.  Nobody cares.  Disk space is 
cheaper than programmer time.

Further upsides are that you always know exactly which version of libraries 
you're calling so you don't have to work around version faults, and you never 
have the problem of someone else's app installer overwriting your library and 
introducing unexpected behaviour.

SQLite on a Mac has standard Mac behaviour here.  As a programmer you aren't 
expected to use a library.  You can download up-to-date source files for SQLite 
'Amalgamated' version from the SQLite server



and use those.  You get .h and .c files, drop them into your IDE and go.  If 
you're a database admin, or as a programmer you want to use a tool to admin the 
databases your apps will use, you get the sqlite3 command-line tool from the 
same page and use that.  No shared libraries.  In fact no library at all, just 
C source code.  Think you've found a bug ?  You've got the source code right 
there.  Go look at it.  If you find something, post here.

But actually SQLite is used so much on Macs that Apple included a copy of the 
shell tool with the OS.  You'll find a copy of the sqlite3 shell tool as

/usr/bin/sqlite3

Apple's Developer Tools installations include copies of the .h and .c files 
(many many copies of the .h file) but I recommend that you just grab new ones 
from the SQLite server whenever you start a new project.  That way you get all 
the recent features and bugfixes.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] General setup on Mac OSX 10.7

2012-12-16 Thread Tim Johnson
Greetings :

I've recently set up drupal on my workstation which is hosting Mac
OSX 10.7. I would welcome
1)Recommendations on what I should install to manage sqlite
2)How they should be installed
  NOTE: macports works well for me but alternative suggestions are
  welcomed.
The macports list re sqlite can be seen here :
http://www.macports.org/ports.php?by=name=sqlite

Thanks
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Any limitation of file size on sqlite?

2012-12-16 Thread a . furieri

On Sun, 16 Dec 2012 22:02:41 +0200, Çağlar Orhan wrote:
 what gbytes bigger size of .sqlite file should significant to work 
on it

properly?
I mean, is there a 10-12 GB sqlite file that working properly and 
with any

problem?



Hi Çağlar,

from my first hand experience on the geospatial/GIS domain
(I'm the maintainer of the SpatiaLite project [1]): I know
for sure that sqlite/spatialite DB-files as big as an
impressive 160 GB has been successfully tested.

bye sandro

[1] http://www.gaia-gis.it/gaia-sins/



--
Il messaggio e' stato analizzato alla ricerca di virus o
contenuti pericolosi da MailScanner, ed e'
risultato non infetto.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Any limitation of file size on sqlite?

2012-12-16 Thread Çağlar Orhan
Hello again,
Thank you Simon.
The page http://www.sqlite.org/limits.html has my answer partly. In MS IIS
 what gbytes bigger size of .sqlite file should significant to work on it
properly?
I mean, is there a 10-12 GB sqlite file that working properly and with any
problem?
Thanks
Caglar

-- 
facta non verba
ordo ab chao
to code or not to code...
Follow me (twitter.com/caglaror)
Biz Contacts for LinkedIn Wellcome
Script Works www.co-scripts.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] ordering result sets

2012-12-16 Thread e-mail mgbg25171
I am returning records if today is more than x days from lastdate or I have
previously specified a next date and that date is today.
Here's my query

"select f.*, lastdate, nextdate from" & _
"(" & _
"SELECT f.*, lastdate, nextdate" & _
"FROM firms f" & _
"LEFT JOIN" & _
"(SELECT firm_ID, MAX(contacted) AS lastdate,  MAX(arranged) AS
nextdate FROM calls group by firm_id) c" & _
"ON c.firm_id = f.id" & _
"Where (julianday(current_date) - julianday(lastdate) > 6)" & _
"OR lastdate IS NULL" & _
"OR (julianday(current_date) = julianday(nextdate))" & _
"OR nextdate IS NULL" & _
") f where f.status = 'ok'"

I have modified my program to have next time (not shown) as well as next
date
What I'd to know is...
How do I order results firstly by earlest non-null/empty string next time
(ALL DAYS HERE WILL BE TODAY) order and then BY earliest non-null/empty
string nextdate order
so...
I end up with a list of records in call time order followed by a list of
records beginning with the one called longest ago.
I hope that makes sense.
BTW Sorry if I haven't thanked you for helping me before.
I do get emails from the mailing list but...they're never mine or answers
to mine.
I'm just going to check the archives instead so just to let you know...I'm
ALWAYS appreciative of all help I get!!!
Thank you in anticipation
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] INSERT OR REPLACE

2012-12-16 Thread Peter Haworth
Thanks SImon.  Pretty much what I expected, just checking if I was missing
something obvious.
Pete
lcSQL Software 



On Sun, Dec 16, 2012 at 9:00 AM,  wrote:

> I think you 'should not use'.  You can do an UPDATE and see whether it
> updated anything using the sqlite3_changes() API call or the changes() SQL
> function.  Then you can decide whether you want to do the INSERT.
>
> Or you can do a SELECT to find out if there're any existing rows before
> you do your INSERT.
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users