Hajime MATSUMOTO wrote:
> ALTER TABLE ADD COLUMN UNIQUE(avap_id, vacation_start_date) ON
> CONFLICT REPLACE;
> SQL error near line 3: near "ADD": syntax error
First, it's ALTER TABLE tablename ADD ... . That's the immediate cause of the
syntax error you get.
But it's not going to fly anyway. You
thank you for replying my question.
i am wondering if i can use ALTER TABLE for two columns unique.
i am showing my sql and also i tryed what you said.
please take a look.
CREATE TABLE AVP_VAC("avp_id", "vacation_start_date", "vacation_length",
"vacation_status", "vacation_plan_note", "temp_char
"Ron Arts" schrieb im
Newsbeitrag news:4ad10a9e.3040...@arts-betel.org...
> Here's my new benchmark output:
>
> sqlite3 insert 50 records time: 17.19 secs
> sqlite3 select 50 records time: 18.57 secs
> sqlite3 prepared select 50 records time: 3.27 secs
> glib2 hash tables insert 5000
On Sat, 2009-10-10 at 19:31 +0100, Simon Slavin wrote:
> On 10 Oct 2009, at 5:08pm, David Bicking wrote:
>
> > I have a table:
> > CREATE TABLE Assets
> > ( ControlDate Date
> > , Amt
> > )
>
> There is no such column type as 'Date' in SQLite. You got TEXT,
> INTEGER, REAL. Make sure you
Jay A. Kreibich schreef:
> On Sat, Oct 10, 2009 at 11:57:30PM +0200, Ron Arts scratched on the wall:
>
>> I'm expanding my benchmark to test just thaty, but I'm running into a
>> problem.
>> Here's my code (well part of it):
>>
>>sqlite3_stmt *stmt;
>>rc = sqlite3_prepare(db, "select name
On 10 Oct 2009, at 10:57pm, Ron Arts wrote:
> The sqlite3_bind_int immediately gives me an RANGE_ERROR (25).
> Is there some obvious thing I'm doing wrong?
I notice that your _prepare call puts single quotes around the
variable, whereas you are binding an integer to it. But that's
probably
On Sat, Oct 10, 2009 at 11:57:30PM +0200, Ron Arts scratched on the wall:
> I'm expanding my benchmark to test just thaty, but I'm running into a problem.
> Here's my code (well part of it):
>
>sqlite3_stmt *stmt;
>rc = sqlite3_prepare(db, "select name from company where id = '?'", -1,
>
Jay A. Kreibich schreef:
> On Sat, Oct 10, 2009 at 07:24:33PM +0200, Ron Arts scratched on the wall:
>
>> I'm afraid the process of
>> constructing SQL queries / parsing them by sqlite, and
>> interpreting the results in my app, multiple times per
>> event will be too slow.
>
> There should be
On 10 Oct 2009, at 9:27pm, Jay A. Kreibich wrote:
> On Sat, Oct 10, 2009 at 07:38:08PM +0100, Simon Slavin scratched on
> the wall:
>>
>
>> Don't forget to use transactions, even for when you are just doing
>> SELECTs without changing any data.
>
> Using transactions speeds up a long series of
On Sat, Oct 10, 2009 at 07:38:08PM +0100, Simon Slavin scratched on the wall:
>
> On 10 Oct 2009, at 7:04pm, Roger Binns wrote:
>
> > Ron Arts wrote:
> >> So I am wondering if I can drop the glib Hash Tables, and
> >> go sqlite all the way. But I'm afraid the process of
> >> constructing SQL quer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ron Arts wrote:
> Using hash tables I can do 10 requests in .24 seconds
> meaning around 40 req/sec.
If you are just doing simple lookups (eg doing equality on a single column)
then a hash table will always beat going through SQLite. But if y
On Sat, Oct 10, 2009 at 07:24:33PM +0200, Ron Arts scratched on the wall:
> I'm afraid the process of
> constructing SQL queries / parsing them by sqlite, and
> interpreting the results in my app, multiple times per
> event will be too slow.
There should be no need to construct and parse querie
Ok,
I just finished writing a test program. It creates an SQLite memory table
and inserts 50 records, then it selects 50 times on a random key.
After that it uses hash memory tables to do the same thing. Here is the
test output:
sqlite3 insert 50 records time: 17.21 secs
sqlite3 sele
On 10 Oct 2009, at 7:04pm, Roger Binns wrote:
> Ron Arts wrote:
>> So I am wondering if I can drop the glib Hash Tables, and
>> go sqlite all the way. But I'm afraid the process of
>> constructing SQL queries / parsing them by sqlite, and
>> interpreting the results in my app, multiple times per
On 10 Oct 2009, at 5:08pm, David Bicking wrote:
> I have a table:
> CREATE TABLE Assets
> ( ControlDate Date
> , Amt
> )
There is no such column type as 'Date' in SQLite. You got TEXT,
INTEGER, REAL. Make sure you know what's going into that field. Also
I don't understand your pri
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ron Arts wrote:
> So I am wondering if I can drop the glib Hash Tables, and
> go sqlite all the way. But I'm afraid the process of
> constructing SQL queries / parsing them by sqlite, and
> interpreting the results in my app, multiple times per
> event
The title is a bit silly. HP-UX is distributed by HP, not IBM of course.
Sorry for any confusion.
dave
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Hello!
How about solution like to
select rowid from my_fts_table
where my_fts_table match @query2 and rowid in
(select rowid from my_fts_table where my_fts_table match @query1)
limit 21
I don't know about performance of this but rowid index may be used success.
Best regards, Alexey Pechnik
Rich Shepard wrote:
> On Sat, 10 Oct 2009, Dr. David Kirkby wrote:
>
>> I work on the Sage maths project which aims to create a viable free open
>> source alternative to Magma, Maple, Mathematica and Matlab.
>
> Dave,
>
> I've use Octave which is supposed to be a F/OSS equivalent to Matlab.
>
Hi,
I am building a libevent based application that must be
able to handle tens of thousands requests per second.
Each request needs multiple database lookups. Almost
all requests do the lookups on the primary key of the tables
only. So far I have been using Hash Tables from the glib2
library. Bu
> Can I put CHECK (Amt >=0), yet somehow allow the one or two accounts
> that can be negative to be negative? I am assuming the answer is NO.
> Am I correct?
Yes, you're correct.
> CREATE TABLE Assets
> ( Nametext PRIMARY KEY
> , Amt integer
> , CF text -- Y if ac
Can you show me what the constraint would look like?
Thanks,
David
On Sat, 2009-10-10 at 09:11 -0700, Harold Wood & Meyuni Gani wrote:
> You can do it as a constraint.
>
> -Original Message-
> From: David Bicking
> Sent: Saturday, October 10, 2009 9:08 AM
> To: sqlite-users@sqlite.org
>
You can do it as a constraint.
-Original Message-
From: David Bicking
Sent: Saturday, October 10, 2009 9:08 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] controlling changes
I have a table:
CREATE TABLE Assets
( ControlDate Date
, Amt
)
Now, the business rules are you can
I have a table:
CREATE TABLE Assets
( ControlDate Date
, Amt
)
Now, the business rules are you can INCREASE the Amt if the Current Date
is the ControlDate in the record. You can DECREASE the amount if the
Current Date is greater than or equal to the ControlDate.
Can this be enforced v
I've never had to deliberately use check constraints in my projects, but
I would like to use them on a new projects. I've googled the subject,
but found no good explanations.
I have a table
CREATE TABLE Assets
( Nametext PRIMARY KEY
, Amt integer
);
Now, for 99% of the record
On 10 Oct 2009, at 9:27am, Hajime MATSUMOTO wrote:
> i used to use "CREATE INDEX" with "ON CONFLICT".
> i am sure it was able to do on sqlite 2.x.x.
> but i tryed on sqlite3 it dose not work.
You can use 'ON CONFLICT' in either of
CREATE TABLE
ALTER TABLE ADD COLUMN ... UNIQUE
but not when def
-Message d'origine-
De : jm cuaz [mailto:jm.c...@orens.fr]
Envoyé : vendredi 9 octobre 2009 16:13
À : sqlite-users@sqlite.org
Objet : Tcl API - DROP TABLE when processing the results of a querry one row at
a time
Hello,
SQlite 3.6.10 - no "shared-cahe mode" - no explicit transaction
On Fri, 9 Oct 2009 17:08:01 -0600, Kelly Jones
wrote:
>Consider a wiki that lets you edit rows in a db table. Each page is a
>row in the table, and has fields that anyone can edit. Like all wikis,
>it keeps a history of edits (including who made the edits), and lets
>you revert an edit, or even d
hi every one.
i used to use "CREATE INDEX" with "ON CONFLICT".
i am sure it was able to do on sqlite 2.x.x.
but i tryed on sqlite3 it dose not work.
dose anybody knows the probrem?
Hajime
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sql
29 matches
Mail list logo