Hello,
I have an issue with my database (sqlite 3.4.2), runing some updates
makes it use more filespace than needed.
I am using this kind of schema :
CREATE TABLE mytable (myKey TEXT PRIMARY KEY, myInt INTEGER, myBlob
TEXT)
1st : Inserting a row
Let's say that myBlob data is 256K.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Nemanja Čorlija wrote:
My problem is that I am running out of memory when trying to load
1.6GB sqlite3 db from disk to :memmory: db on a computer with 4GB of
RAM.
Your RAM isn't the problem. You are running out of address space. For
a 32 bit
Hello All,
I've used SQL Server for over 15 years, Oracle off on when I have no
choice, but SQLite for a couple weeks. I've just learned (today) that
SQLite respects trailing spaces when comparing two character fields.
I.e. 'SQLITE' 'SQLITE '
Is this behavior intentional? Neither SQL Server
Fowler, Jeff [EMAIL PROTECTED] wrote:
Yes - I've looked over the current date functions. I would propose a
single function addition that's hugely valuable in the business world.
SQL Server has a function called datediff for date arithmetic. It
accepts three parameters. The first indicates the
Fowler, Jeff [EMAIL PROTECTED] wrote:
Hello All,
SQLite newbie here. I've looked through the email archives and website
trying to find out how to compute the difference in months between two
given dates. Each date is in -MM-DD HH:MM:SS format.
The best I've been able to come up with
Yes - I've looked over the current date functions. I would propose a
single function addition that's hugely valuable in the business world.
SQL Server has a function called datediff for date arithmetic. It
accepts three parameters. The first indicates the unit of scale (years,
months, weeks, days,
DATEDIFF should compute the difference by arithmetic subtracting M/Y in
month case, if I'm not wrong
ex:
DateDiff (month, 1-1-2007, 3-30-2007) will return 2
Its that right ?
A good reference for trying implementing it should be:
http://www.sqlteam.com/article/datediff-function-demystified
You're right of course - I just noticed the question pertains to the
algorithm, not the function itself. Sorry!
I just ran a simple test using popular RDBMS product A on one of our
internal databases, as follows:
select 'year difference:', datediff(yy,'12/31/2007','1/1/2008') -- year
difference:
Fowler, Jeff wrote:
Yes - I've looked over the current date functions. I would propose a
single function addition that's hugely valuable in the business world.
SQL Server has a function called datediff for date arithmetic. It
accepts three parameters. The first indicates the unit of scale
Not really that goofy, just very specific.
The SQL Server manual describes it this way:
Returns the number of date and time boundaries crossed between two
specified dates.
Regards,
Noah Hart
-Original Message-
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
[EMAIL PROTECTED] writes:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
return 1 even though the difference is really only 1 second? Seems
goofy to me
well, this is one second rounded up to the next full month...If that
is the kind of information you want
Fowler, Jeff [EMAIL PROTECTED] wrote:
Remember gang, if you want to know how many seconds are between two
timestamps, you wouldn't ask for a difference in months. You'd say
something like DATEDIFF(seconds, t1, t2).
So DATEDIFF doesn't really compute the difference between
two dates. It
Remember gang, if you want to know how many seconds are between two
timestamps, you wouldn't ask for a difference in months. You'd say
something like DATEDIFF(seconds, t1, t2).
- Jeff
-Original Message-
From: Markus Hoenicka [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 17, 2008
Virgilio Fornazin [EMAIL PROTECTED] wrote:
DATEDIFF should compute the difference by arithmetic subtracting M/Y in
month case, if I'm not wrong
ex:
DateDiff (month, 1-1-2007, 3-30-2007) will return 2
Its that right ?
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00')
Greetings,
Currently I am using sqlite3 in a multi-process/multi-threaded server
setting.
I use a Mutex to ensure only one process/thread can access the database at
one time.
The current flow of events:
Get Mutex
Open Database connection
Run Query
Close Database connection
Release Mutex
This
Philip Nick [EMAIL PROTECTED] wrote:
Greetings,
Currently I am using sqlite3 in a multi-process/multi-threaded server
setting.
I use a Mutex to ensure only one process/thread can access the database at
one time.
The current flow of events:
Get Mutex
Open Database connection
Run Query
On 1/17/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Fowler, Jeff [EMAIL PROTECTED] wrote:
Remember gang, if you want to know how many seconds are between two
timestamps, you wouldn't ask for a difference in months. You'd say
something like DATEDIFF(seconds, t1, t2).
So DATEDIFF
By the way.. I found this snippet. If I read it right, it seems that
IGNORING trailing spaces during string comparisons is ANSI standard.
SQL Server follows the ANSI/ISO SQL-92 specification (Section 8.2,
Comparison Predicate, General rules #3) on how to compare strings with
spaces. The ANSI
On Thu, Jan 17, 2008 at 10:43:20AM -0500, Fowler, Jeff wrote:
I've used SQL Server for over 15 years, Oracle off on when I have no
choice, but SQLite for a couple weeks. I've just learned (today) that
SQLite respects trailing spaces when comparing two character fields.
I.e. 'SQLITE' 'SQLITE
On Thu, Jan 17, 2008 at 05:25:30PM -0500, Fowler, Jeff wrote:
By the way.. I found this snippet. If I read it right, it seems that
IGNORING trailing spaces during string comparisons is ANSI standard.
I'm not sure. I was always avoiding such problem by trim-ming everything
to be inserted;
Thanks for replying,
I have tried moving the Open/Close outside the mutex no change.
As for using our own mutex, we started with early versions of sqlite and had
to come up with our own solution. I was planning on looking into using the
built in mutex's, but first I need to solve the performance
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
Philip Nick
Sent: Thursday, January 17, 2008 1:48 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] sqlite3 performace
Greetings,
Currently I am using sqlite3 in a multi-process/multi-threaded
Areyou doing an sqlite3_finalize and checking to see that you actually
close the DB?
Philip Nick wrote:
Thanks for replying,
I have tried moving the Open/Close outside the mutex no change.
As for using our own mutex, we started with early versions of sqlite and had
to come up with our own
[EMAIL PROTECTED] wrote:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
return 1 even though the difference is really only 1 second? Seems
goofy to me
I have been staring at this until I'm getting goofy.
Written as it is, isn't the time interval 1 second
Gerry Snyder [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
return 1 even though the difference is really only 1 second? Seems
goofy to me
I have been staring at this until I'm getting goofy.
I'm choosing desired column names dynamically, then store all the names
in one variable, something like this...
set columns column1, column2, column3
The names are chosen in much more complicated way, but the above is just
a variable contents example. I'm trying then to fetch the data like
On Jan 17, 2008 12:00 PM, Roger Binns [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Nemanja Čorlija wrote:
My problem is that I am running out of memory when trying to load
1.6GB sqlite3 db from disk to :memmory: db on a computer with 4GB of
RAM.
Your RAM isn't
On Jan 17, 2008, at 10:23 PM, Zbigniew Baniewski wrote:
I'm choosing desired column names dynamically, then store all the
names
in one variable, something like this...
set columns column1, column2, column3
The names are chosen in much more complicated way, but the above is
just
a
Guys,
I guess I'm the newest SQLite person on this email list and I know I'm
definitely the dumbest. It seems like a lot of you are trying to justify why
two dates that are one minute apart can have a function say they're one month
apart. Don't look at it that way. Back when mainframes and
Nemanja Čorlija wrote:
On Jan 17, 2008 12:00 PM, Roger Binns [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Nemanja Čorlija wrote:
My problem is that I am running out of memory when trying to load
1.6GB sqlite3 db from disk to :memmory: db on a computer with 4GB of
30 matches
Mail list logo