Re: [sqlite] In memory database question

2007-08-28 Thread RaghavendraK 70574

Hi,

I did tried something crazy like this (it worked, for read only DB only).
I changed pread to preadCustom api.Then in preadCustom maintained a static 
fdArray. if fd is not listed then i mmap the whole file and the use the memcpy 
to return the data. There was significant performance again as there was no 
context switch.
U can overload all the os wrappers to your custom impl and then share it with 
multiple threads.

I had to do this as even mounting the file on /dev/shm there was no significant 
performance gain.

Just a possible direction,

regards
ragha

**
 This email and its attachments contain confidential information from HUAWEI, 
which is intended only for the person or entity whose address is listed above. 
Any use of the information contained herein in any way (including, but not 
limited to, total or partial disclosure, reproduction, or dissemination) by 
persons other than the intended recipient(s) is prohibited. If you receive this 
e-mail in error, please notify the sender by phone or email immediately and 
delete it!
 
*

- Original Message -
From: Virgilio Alexandre Fornazin [EMAIL PROTECTED]
Date: Tuesday, August 28, 2007 8:42 pm
Subject: [sqlite] In memory database question

 Hi
 
 
 
 There´s possible to share a sqlite3 handle to a memory database in all
 threads of application?
 
 Or there´s a way to ?duplicate? the handle (sqlite_open() or 
 something like
 that)?
 
 
 
 
 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] In memory database question

2007-08-28 Thread Virgilio Alexandre Fornazin
I'm thinking in a more generic way... using /dev/shm works on linux, but not
on windows.
Also, r/w support is a must have, so this approach cannot solve the problem.
Since we have 'drivers' for windows / linux / etc, a 'memory' driver would
be enought,
simulating file opening / closing / deleting, creating the possibility of
managing 
various in-memory databases at same time usable by the other threads of the
process.

There´s some planning to support a thing like this? It´s a bit crazy but a
lot interesting.


-Original Message-
From: RaghavendraK 70574 [mailto:[EMAIL PROTECTED] 
Sent: terça-feira, 28 de agosto de 2007 12:56
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] In memory database question


Hi,

I did tried something crazy like this (it worked, for read only DB only).
I changed pread to preadCustom api.Then in preadCustom maintained a static
fdArray. if fd is not listed then i mmap the whole file and the use the
memcpy to return the data. There was significant performance again as there
was no context switch.
U can overload all the os wrappers to your custom impl and then share it
with multiple threads.

I had to do this as even mounting the file on /dev/shm there was no
significant performance gain.

Just a possible direction,

regards
ragha


**
 This email and its attachments contain confidential information from
HUAWEI, which is intended only for the person or entity whose address is
listed above. Any use of the information contained herein in any way
(including, but not limited to, total or partial disclosure, reproduction,
or dissemination) by persons other than the intended recipient(s) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!
 

*

- Original Message -
From: Virgilio Alexandre Fornazin [EMAIL PROTECTED]
Date: Tuesday, August 28, 2007 8:42 pm
Subject: [sqlite] In memory database question

 Hi
 
 
 
 There´s possible to share a sqlite3 handle to a memory database in all
 threads of application?
 
 Or there´s a way to ?duplicate? the handle (sqlite_open() or 
 something like
 that)?
 
 
 
 
 
 


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


-
To unsubscribe, send email to [EMAIL PROTECTED]
-