[sqlite] Building multiple indexes in one scan over a table

2014-06-10 Thread Fabian Giesen
Hi, I'm working on a profiler that uses SQLite to store and index the results. Due to the nature of the task, the workload ends up splitting into essentially three phases: 1. Bulk insertion of relatively large amounts of data (low hundreds of megabytes to tens of gigabytes); a typical

Re: [sqlite] Building multiple indexes in one scan over a table

2014-06-10 Thread Simon Slavin
On 10 Jun 2014, at 7:22pm, Fabian Giesen wrote: > 1. Bulk insertion of relatively large amounts of data (low hundreds of > megabytes to tens of gigabytes); a typical profile generates on the order of > 10MB of sampling data per second.CREATE INDEX samples_by_time ON

Re: [sqlite] Building multiple indexes in one scan over a table

2014-06-10 Thread Nico Williams
On Tue, Jun 10, 2014 at 4:25 PM, Simon Slavin wrote: > On 10 Jun 2014, at 7:22pm, Fabian Giesen wrote: > Not possible in current SQLite. No standard syntax for doing it in SQL. A > quick google suggests that no other popular DBMS implements it.

Re: [sqlite] Building multiple indexes in one scan over a table

2014-06-10 Thread Richard Hipp
On Tue, Jun 10, 2014 at 2:22 PM, Fabian Giesen wrote: > > So, is there any way to create multiple indexes for the same table in one > operation in SQLite? If not, how hard would it be to add? > Creating an index is essentially the same thing as sorting the whole table

[sqlite] What is the recommended size we should keep aside for sqlite journal

2014-06-10 Thread Mayank Kumar (mayankum)
We have limited flash space and we would like to know what is the recommended allocation for the sqlite db vs sqlite journal file. Should it be 50-50 or it doesn't matter. If there is no very less space remaining to write the complete journal file, what will happen. Any help is appreciated.

Re: [sqlite] Building multiple indexes in one scan over a table

2014-06-10 Thread Fabian Giesen
On 6/10/2014 2:25 PM, Simon Slavin wrote: On 10 Jun 2014, at 7:22pm, Fabian Giesen wrote: 1. Bulk insertion of relatively large amounts of data (low hundreds of megabytes to tens of gigabytes); a typical profile generates on the order of 10MB of sampling data

Re: [sqlite] What is the recommended size we should keep aside for sqlite journal

2014-06-10 Thread Richard Hipp
On Tue, Jun 10, 2014 at 6:43 PM, Mayank Kumar (mayankum) wrote: > We have limited flash space and we would like to know what is the > recommended allocation for the sqlite db vs sqlite journal file. Should it > be 50-50 or it doesn't matter. If there is no very less space

Re: [sqlite] Building multiple indexes in one scan over a table

2014-06-10 Thread Simon Slavin
On 11 Jun 2014, at 12:21am, Fabian Giesen wrote: > I just wanted > to ask to make sure there wasn't a way I was missing! Nothing obvious from your clear description. Good luck with it. Simon. ___ sqlite-users mailing list

[sqlite] sqlite3Hwtime() on x86_64: only lower 32 bits used

2014-06-10 Thread Cyberman Wu
I want to do a profiling in my software using TSC, running under Linux x86_64. I tried to search on my local disk for a example and found out in SQLite3: #elif (defined(__GNUC__) && defined(__x86_64__)) __inline__ sqlite_uint64 sqlite3Hwtime(void){ unsigned long val; __asm__

Re: [sqlite] Building multiple indexes in one scan over a table

2014-06-10 Thread Dominique Pellé
Fabian Giesen wrote: > Simon Slavin wrote: ... >> Also, store your time as a numeric value (Unix epoch or Julian day) rather >> than a string. Numbers are faster to handle than strings. INTEGERs are >> faster to handle than REALs. > > > :-) > > The time fields are 64-bit ints. The exact meaning

[sqlite] BUG with unnecessary brackets in queries with IN ( SELECT .. )

2014-06-10 Thread beell
>Von: "Richard Hipp" >An: "General Discussion of SQLite Database" >Betreff: Re: [sqlite] BUG with unnecessary brackets in queries with IN ( >SELECT .. ) >On Sun, Jun 8, 2014 at 7:52 PM, Martin Hristov wrote: > >> Simple example : >>