Re: [sqlite] sorting records in random order

2008-05-07 Thread John Stanton
Sorting in random order is a definite contradiction in terms. What are you actually trying to do? Barbara Weinberg wrote: > Hi > I was wondering whether anyone had tried sorting records in random order > using sqlite3. I tried sorting by random() and randomblob() but it was very > slow and

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread John Stanton
They are all type INTEGER, essentially a 64 bit signed integer. Joanne Pham wrote: > Hi , >> "Can you direct us where you find out that "SQLITE3 has bigint and int" >> as datatypes?" > > Not on any website but one of another project in my company using sqlite and > they created one of the using

Re: [sqlite] Porting into a microcontroller, minimum requirements

2008-05-07 Thread Andrew Cunningham
*snip* "I have doubts that you will be able to get SQLite to work on anything less than a 32-bit processor. D. Richard Hipp" I was under the impression as long as the processor had enough room to hold the program (and RAM) it would work. The difference I would have expected would simply be

Re: [sqlite] sorting records in random order

2008-05-07 Thread Samuel Neff
On Wed, May 7, 2008 at 5:25 PM, Dennis Cote <[EMAIL PROTECTED]> wrote: > > I couldn't see how these would be different so I fired up the explain > command. As I expected, these two produce identical code (except for the > integer id assigned to the ephemeral table used for the sort). I don't >

Re: [sqlite] sorting records in random order

2008-05-07 Thread RB Smissaert
I compared the speeds and found them to be the same. RBS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Cote Sent: 07 May 2008 22:25 To: General Discussion of SQLite Database Subject: Re: [sqlite] sorting records in random order Samuel Neff

Re: [sqlite] sorting records in random order

2008-05-07 Thread Dennis Cote
Samuel Neff wrote: > This query runs slow: > > SELECT id FROM data ORDER BY random(); > > but this equivalent query runs very fast: > > SELECT id FROM (SELECT id, random() r FROM data) ORDER BY r; > I couldn't see how these would be different so I fired up the explain command. As I expected,

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread Joanne Pham
Thank you so much for the detail explanation about datatype. Big thanks, JP - Original Message From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: General Discussion of SQLite Database Cc: [EMAIL PROTECTED] Sent: Wednesday, May 7, 2008 12:27:21 PM Subject: Re:

Re: [sqlite] sorting records in random order

2008-05-07 Thread Samuel Neff
This query runs slow: SELECT id FROM data ORDER BY random(); but this equivalent query runs very fast: SELECT id FROM (SELECT id, random() r FROM data) ORDER BY r; HTH, Sam On Wed, May 7, 2008 at 2:37 PM, Barbara Weinberg <[EMAIL PROTECTED]> wrote: > Hi > I was wondering whether anyone had

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread Nicolas Williams
The key point, in all this thread, is that SQLite3 does not, in fact, support a "BIGINT" value type as such, though it does allow the use of that string as a column type affinity. Nico -- ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread cmartin
On Wed, 7 May 2008, Joanne Pham wrote: I was wondering what is the different in size between int(8) and INTEGER datatype. Thanks, In the sense you are asking, there is no difference, but more importantly, the question reflects a misunderstanding of how SQLite is designed. Most database

[sqlite] sorting records in random order

2008-05-07 Thread Barbara Weinberg
Hi I was wondering whether anyone had tried sorting records in random order using sqlite3. I tried sorting by random() and randomblob() but it was very slow and chewed up lots of resources. Any suggestions? Barbara ___ sqlite-users mailing list

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread P Kishor
On 5/7/08, Joanne Pham <[EMAIL PROTECTED]> wrote: > > Hi , > > "Can you direct us where you find out that "SQLITE3 has bigint and int" > > as datatypes?" > > Not on any website but one of another project in my company using sqlite and > they created one of the using bigint, boolean, int(1) > as

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread Jay A. Kreibich
On Wed, May 07, 2008 at 10:02:32AM -0700, Joanne Pham scratched on the wall: > Hi All, > I have read online document regarding SQLITE3 data type and below is > list of these datatypes: > * TEXT > * NUMERIC > * INTEGER > * REAL > * NONE Those aren't datatypes,

Re: [sqlite] Porting into a microcontroller, minimum requirements

2008-05-07 Thread Eduardo Morras
At 02:43 07/05/2008, you wrote: >Hi, > >I was wondering if anyone has any basic guide lines on embedding SQLite into >a microcontroller. For example, I am considering using an 8/16 bit processor >with 1 MB flash, 1 MB SRAM and 2 GB data storage (SD card). Has anyone ported >this before to an

Re: [sqlite] splite database under version control (subversion)?

2008-05-07 Thread Eduardo Morras
At 23:19 04/05/2008, you wrote: >If you use svn only to sync over many pc maybe you can put your project on a >usb device (or usb hd) so you don't need to "sync" with svn. > >If you WANT to use svn and you are under linux you can create an alias for >commit that make a dump of your db then commit

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread Myk Melez
Joanne Pham wrote: > I have read online document regarding SQLITE3 data type and below is list of > these datatypes: > * TEXT > * NUMERIC > * INTEGER > * REAL > * NONE > But just now I found out SQLITE3 has bigint and int as another datatype. SQLite doesn't

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread Igor Tandetnik
Joanne Pham <[EMAIL PROTECTED]> wrote: > I have read online document regarding SQLITE3 data type and below is > list of these datatypes: > * TEXT > * NUMERIC > * INTEGER > * REAL > * NONE > But just now I found out SQLITE3 has bigint and int as another > datatype. Where and how did you "find this

Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread P Kishor
On 5/7/08, Joanne Pham <[EMAIL PROTECTED]> wrote: > Hi All, > I have read online document regarding SQLITE3 data type and below is list of > these datatypes: > * TEXT > * NUMERIC > * INTEGER > * REAL > * NONE > But just now I found out SQLITE3 has bigint

[sqlite] SQLITE3 datatype

2008-05-07 Thread Joanne Pham
Hi All, I have read online document regarding SQLITE3 data type and below is list of these datatypes: * TEXT * NUMERIC * INTEGER * REAL * NONE But just now I found out SQLITE3 has bigint and int as another datatype. Can you direct me where I can find

[sqlite] ArGoSoft Mailing List Server

2008-05-07 Thread administrator
Command On May 6, 2008, at 11:08 PM, Scott Hess wrote: I suppose in DELETE mode, SQLite will delete the journal for you, but I don't think it would hurt to do it yourself... No, it's deadly to do it yourself. That is my point. Unless you very carefully analyze the lock state of the database

Re: [sqlite] PRAGMA journal_mode not implemented?

2008-05-07 Thread D. Richard Hipp
On May 6, 2008, at 11:08 PM, Scott Hess wrote: > > I suppose in DELETE mode, SQLite will delete the journal for you, but > I don't think it would hurt to do it yourself... No, it's deadly to do it yourself. That is my point. Unless you very carefully analyze the lock state of the database

Re: [sqlite] PRAGMA journal_mode not implemented?

2008-05-07 Thread Ralf Junker
>In PERSIST mode, you have two files associated with your database >instead of one. Whenever you move, copy, or rename the database file >you *must* also move, copy or rename the journal file to prevent >database corruption. > >The persistent journal file uses disk space that might

Re: [sqlite] make sqlite3 ends with error "make: Fatal error: Command failed for target `libsqlite3.la'"

2008-05-07 Thread Schiffl, Martin
Hi Dimitri, thank you for the tipp. No I found out, what the problem is. It was a permission problem. There was no corresponding message, but using another PREFIX for the libraries solved the problem. Thank you. BR Martin -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL