Even though I know this is not the right question to ask this list, I
would expect some help from you.
The question is regarding C bit fields..
struct
{
unsigned int a:1;
};
This declares a to hold 1 bit value;
How can I make an array of bit fields? something like, using the 16 bits
of a
http://en.wikipedia.org/wiki/Bit_field
Lloyd a écrit :
Even though I know this is not the right question to ask this list, I
would expect some help from you.
The question is regarding C bit fields..
struct
{
unsigned int a:1;
};
This declares a to hold 1 bit value;
How can I make an array
So from Oakland, CA to Charlotte, NC in only 62 days. And one
wonders why the nobody sends letters anymore<<
USPS sucks big time. I'm in the UK, my best friend, who is blind, is in
Sacramento, CA. The stuff I send her only arrives at all about 10% of the
time.Our Royal Mail
Dear experts:
I'm having a performance problem I can't understand. I am running a
"select count(*)" query joining a table on itself, and the query runs
for five minutes using Sqlite3.exe before I get bored and kill it. This
is on a dual-core box with 4GB of memory, running Windows XP Pro. The
Hi,
Could anyone share their observations/comments on having used sqlite as DB
for embedded linux environment.
Thanks,
Pavan.
--
'
Always finish stronger than you start
Why isn't there a sqlite3_exec16 function?
I've seem this question before, but haven't found any answer.
Best regards
Daniel
-
To unsubscribe, send email to [EMAIL PROTECTED]
Stephen Toney
wrote:
select count(*) from keyword a, keyword b where a.key=b.key and
a.value='music' and b.value='history';
0|0|TABLE keyword AS a WITH INDEX value
1|1|TABLE keyword AS b WITH INDEX value
4,318 records have value='music' and 27,058 have value='history'.
Try running ANALYZE
Lloyd wrote:
How can I make an array of bit fields? something like, using the 16
bits
of a short as an array of bits
You can't. But, if you can use C++ rather than C, there's std::bitset
class that does just that.
Igor Tandetnik
[EMAIL PROTECTED] wrote:
Stephen Toney <[EMAIL PROTECTED]> wrote:
select count(*) from keyword a, keyword b where a.key=b.key and
a.value='music' and b.value='history';
4,318 records have value='music' and 27,058 have value='history'. The
keys are 12-byte strings. That doesn't seem like an
=?ISO-8859-1?Q?Daniel_=D6nnerby?= <[EMAIL PROTECTED]> wrote:
> Why isn't there a sqlite3_exec16 function?
>
Because it is not needed.
The sqlite3_exec() function is implemented in terms of lower-level
SQLite APis. See the source file legacy.c for details. If you
want an sqlite3_exec16()
[EMAIL PROTECTED] wrote:
> Stephen Toney <[EMAIL PROTECTED]> wrote:
>> >
> > Here's the problem query with the plan:
> >
> > select count(*) from keyword a, keyword b where a.key=b.key and
> > a.value='music' and b.value='history';
> >
>
> A faster approach would be:
>
>SELECT (SELECT
Thanks Igor. This is what I wanted.
On Thu, 2007-03-01 at 07:46 -0500, Igor Tandetnik wrote:
> Lloyd wrote:
> > How can I make an array of bit fields? something like, using the 16
> > bits
> > of a short as an array of bits
>
> You can't. But, if you can use C++ rather than C, there's
Dne čtvrtek 01 březen 2007 13:11 Pavan napsal(a):
> Hi,
>
> Could anyone share their observations/comments on having used sqlite as DB
> for embedded linux environment.
I have just started.
Now i have sqlite compiled for embedded linux based on kernel 2.4.18 and
uclibc library on Renesas SuperH
Thanks, Igor, Richard, and Tom,
Why doesn't SQLite use the index on key? I can see from the plan that it
doesn't, but why not? Can only one index be used per query?
This seems strange. I have used SQL Server and Visual Foxpro for this
same problem, and they both handle this query in a second if
I'm using sqlite on embedded device and I didn't have issues till now. good
performance and scalability.
2007/3/1, Jakub Ladman <[EMAIL PROTECTED]>:
Dne čtvrtek 01 březen 2007 13:11 Pavan napsal(a):
> Hi,
>
> Could anyone share their observations/comments on having used sqlite as
DB
> for
Hi,
I've compiled sqlite2 and sqlite3 for some embedded architecture (mipsel, avr,
arm, cris) and it work fine.
If you want an help, post your problems.
Bye
Francesco
-Messaggio originale-
Da: Jakub Ladman [mailto:[EMAIL PROTECTED]
Inviato: giovedì 1 marzo 2007 14.21
A:
On Thu, 2007-03-01 at 12:46 +, [EMAIL PROTECTED] wrote:
> Or maybe better yet: Have you looked into using FTS2 for whatever
> it is you are trying to do? Full-text search is hard to get right
> and you appear to be trying to create your own. Why not use a FTS
> subsystem that is already
Regarding:
"Can only one index be used per query?"
Yes, I believe that *is* the defined behaviour of sqlite (though it does
support compound indicies). Larger DBMS often have very involved code
to determine query plans.
Eric,
Sorry if this is obvious to everyone else but not to me.. what exactly is
cursor()? I don't see it anywhere in the C API and the wrapper I'm using
(SQLite .NET) doesn't have any corresponding method.
In any case, only true way to know how expensive it is is to do some
testing. The
Has anyone had any luck running the latest version of SQLITE3 (3.3.13) under
Windows 95?
I have just upgraded from revision 3.2.2 that run with no problem but newer
versions do not.
Hi Kirrthana,
Im developing an application using sqlite3 in MAC OS,I just wanted
to know wheather sqlite3 can be used in MAC OS.
Yes. It's already built in. Mac OS X 10.4 includes SQLite version
3.1.3. And you can easily install the latest version 3.3.13 by
following the instructions at:
This is such a simple SQL statement. So sorry for the question, but I can't
get it to work.
I'm trying to get a list of employees and the last time they worked on a
job.
FIles are.
employee file : with empl_num = employee number
job_history file : with empl_num, job_num, and last_date = last
Stephen Toney <[EMAIL PROTECTED]> wrote:
> Thanks, Igor, Richard, and Tom,
>
> Why doesn't SQLite use the index on key? I can see from the plan that it
> doesn't, but why not? Can only one index be used per query?
>
> This seems strange. I have used SQL Server and Visual Foxpro for this
> same
Stephen Toney <[EMAIL PROTECTED]> wrote:
>
> 4. We do not preserve case in the index, so it can ignore incorrect
> capitalization in the search terms. Maybe FTS does this too?
That's a function of your stemmer. The default stemmers in FTS2
both ignore capitalization.
>
> 5. For historical
kokenge <[EMAIL PROTECTED]> wrote:
This is such a simple SQL statement. So sorry for the question, but I
can't get it to work.
I'm trying to get a list of employees and the last time they worked
on a job.
FIles are.
employee file : with empl_num = employee number
job_history file : with
kokenge wrote:
This is such a simple SQL statement. So sorry for the question, but I can't
get it to work.
I'm trying to get a list of employees and the last time they worked on a
job.
FIles are.
employee file : with empl_num = employee number
job_history file : with empl_num, job_num, and
Richard,
Thanks for the additional info. I'll look into the multi-column index
idea. Sounds as if it might be the solution.
Stephen
On Thu, 2007-03-01 at 14:42 +, [EMAIL PROTECTED] wrote:
> Stephen Toney <[EMAIL PROTECTED]> wrote:
> > Thanks, Igor, Richard, and Tom,
> >
> > Why doesn't
Use a mask to load from and store to your bit field/array by using a
bitwise AND (&).
Lloyd wrote:
Even though I know this is not the right question to ask this list, I
would expect some help from you.
The question is regarding C bit fields..
struct
{
unsigned int a:1;
};
This declares a
Samuel R. Neff wrote:
Eric,
Sorry if this is obvious to everyone else but not to me.. what exactly is
cursor()? I don't see it anywhere in the C API and the wrapper I'm using
(SQLite .NET) doesn't have any corresponding method.
A cursor is the thing that you use to run your queries. Eg in
Here is my exact sql as executed:
---
This works
SELECT employee.empl_num
FROM employee
JOIN job_history
ON job_history.empl_num = employee.empl_num
This does not work
SELECT employee.empl_num
FROM employee
JOIN
While cursors are generic to all databases, to me the test and code sample
seems to be very specific to Python. Looking at the code I can't imagine
there are actually any SQLite C calls within the cursor() method.
sqlite3.Connection() undoubtedly maps to sqlite3_open() and cursor.execute()
would
Hi,
I was googling for c++ interfaces for sqlite and found sqlitemm provides.
But, i am unable to download the code. Can some one pls point me to link
from where i can download the c++ interfaces for sqlite.
Thanks,
Pavan.
--
'
Hi, I read the good article on this subject and also the api refference
in the documentation and still feel that I need to ask the following
question.
My application has 2 threads. The main one needs to retrieve data thru
select commands but does not change the database, while the other thread
Pavan wrote:
> Hi,
>
> I was googling for c++ interfaces for sqlite and found sqlitemm provides.
> But, i am unable to download the code. Can some one pls point me to link
> from where i can download the c++ interfaces for sqlite.
You can try my wrapper at
Yes your solution will get you the last date they worked on a job.
Probalm is there is other information in the job record I need. So if I
select other stuff from the job record it may not be from the last job
record. For example - Using this method if I select the MIN(job date) and
salary on
I found that although sqlite claims thread safeness it is actually in your
hands to implement a thread safe access pattern.
Here is how I implemented my sqlite thread saftey. Each thread opens its on
connection.
All operations begin with a
do {
BEGIN EXCLUSIVE
kokenge <[EMAIL PROTECTED]> wrote:
Here is my exact sql as executed:
---
This works
SELECT employee.empl_num
FROM employee
JOIN job_history
ON job_history.empl_num = employee.empl_num
This does not work
SELECT employee.empl_num
Rafi Cohen wrote:
Just another small question to complete this subject: in case of
prepared insert statements, assuming the date is stored as string as in
your example, do I use sqlite3_bind_text with a variable pointing to a
string containing the date I want to insert? In other words, is this a
Pavan wrote:
I was googling for c++ interfaces for sqlite and found sqlitemm provides.
But, i am unable to download the code. Can some one pls point me to link
from where i can download the c++ interfaces for sqlite.
This page http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers has links
to
Using SqLite 3.3.3 I'm trying to prepare the following statement:
"CREATE INDEX IF NOT EXISTS someindexname ON sometable(somecolumn);"
It returns SQLITE_OK but returns a NULL statement. ( I think a newer
version doesn't have this behaviour). Does this actually mean that it
is a unsupported SQL
Sander Jansen wrote:
Using SqLite 3.3.3 I'm trying to prepare the following statement:
"CREATE INDEX IF NOT EXISTS someindexname ON sometable(somecolumn);"
It returns SQLITE_OK but returns a NULL statement. ( I think a newer
version doesn't have this behaviour). Does this actually mean that it
For a select, the number of rows selected.
For an update, the number of rows updates.
For a delete the number of rows deleted.
jim
NOTICE: If received in error, please destroy and notify sender. Sender does not
intend to waive
Anderson, James H (IT)
wrote:
For a select, the number of rows selected.
Just count them as you step through them.
For an update, the number of rows updates.
For a delete the number of rows deleted.
sqlite3_changes, sqlite3_total_changes
Igor Tandetnik
I guess I forgot to mention the context. I'm interested in doing this
from the cmd shell.
-Original Message-
From: Igor Tandetnik [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 01, 2007 4:02 PM
To: SQLite
Subject: [sqlite] Re: Any way to know the numbers of rows affected by a
cmd?
Ok, thanks. The reason I am asking this of course is whether this a
common thing to occur. I assumed the statement would always be
non-NULL if the prepare command return SQLITE_OK. I'll adjust my code
to assume it might be null and only raise error when prepare itself
returns an error as well.
Indeed, try: select count() ...
update count() ...
delete count() ...
Dr. Tom
- Original Message -
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To:
Sent: Thursday, March 01, 2007 3:40 PM
Subject: [sqlite] Any way to know the numbers of rows affected by a
Yes, thanks, I can do that but if the table is large it's quite slow. I
was hoping there was a quicker way, as there is in sybase.
-Original Message-
From: Tom VP [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 01, 2007 4:58 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Any way
Anderson, James H (IT) wrote:
I guess I forgot to mention the context. I'm interested in doing this
from the cmd shell.
James,
You can use the command
pragma count_changes=1
in the shell to have it report the number of rows affected by insert,
update, or delete statements (see
Hi, I have a custom collation sequence (e.g.
mycollate). Are there any advantages in terms of
performance of declaring this collation at the table
level, instead of just at the index level?
For example, if I have:
CREATE TABLE people AS (
country_id char(02),
lastname varchar(100),
phone
Regarding:
Anderson, James H (IT) wrote:
> I guess I forgot to mention the context. I'm interested in doing this
> from the cmd shell.
>
>
James,
You can use the command
pragma count_changes=1
in the shell to have it report the number of rows affected by insert,
update, or delete
On Thu, 2007-03-01 at 15:13 -0800, jp wrote:
> Hi, I have a custom collation sequence (e.g.
> mycollate). Are there any advantages in terms of
> performance of declaring this collation at the table
> level, instead of just at the index level?
>
> For example, if I have:
>
> CREATE TABLE
I don't have access to Windows 95, but you might try finding the highest
version of sqlite3 that did work on 95 and then diff'ing the code (probably
os_win.c) in the next version to see what change broke it and then attach
it to the ticket you've already created. The problem is likely something
Thanks John. yes, I am familiar with this way, I just wanted to know
whether there is a way to make bit field array. From Igor's reply I
understood that it is not possible in C.
Thanks,
Lloyd
On Thu, 2007-03-01 at 09:48 -0600, John Stanton wrote:
> Use a mask to load from and store to your bit
Currently, SQLite uses UNICODE version of Win32 API on Windows implementation.
But a lot of APIs of UNICODE version was not provided for Win95/98.
So, you cannot use SQLite on Win95.
Regards,
-
To unsubscribe, send
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Sander Jansen wrote:
> Ok, thanks. The reason I am asking this of course is whether this a
> common thing to occur. I assumed the statement would always be
> non-NULL if the prepare command return SQLITE_OK. I'll adjust my code
> to assume it might be
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brownie wrote:
> But a lot of APIs of UNICODE version was not provided for Win95/98.
> So, you cannot use SQLite on Win95.
Yes it was. You need to link against unicows.
http://www.microsoft.com.nsatc.net/globaldev/handson/dev/mslu_announce.mspx
56 matches
Mail list logo