Re: [sqlite] BUG: mutex_w32.c; diagnostic message needs to be clearer

2011-03-14 Thread Shane Harrelson
I updated the debug statement here:

http://www.sqlite.org/src/info/def98fd23e

Thanks for the report.
-Shane

On Mon, Mar 14, 2011 at 7:54 PM, Noah Hart  wrote:
>
> In the routine winMutexTry at line 284
>
> -    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
> +    printf("try mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
>
> --
> View this message in context: 
> http://old.nabble.com/BUG%3A-mutex_w32.c--diagnostic-message-needs-to-be-clearer-tp31149931p31149931.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] BUG: mutex_w32.c; diagnostic message needs to be clearer

2011-03-14 Thread Noah Hart

In the routine winMutexTry at line 284

-printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
+printf("try mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);

-- 
View this message in context: 
http://old.nabble.com/BUG%3A-mutex_w32.c--diagnostic-message-needs-to-be-clearer-tp31149931p31149931.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] X most recent entries

2011-03-14 Thread Pavel Ivanov
Try this one:

select * from (select * from multiturnTable order by rowid desc limit 5000)
where (player1 = ? or player2 = ?)
and (complete=0 or p1SubmitScore=0 or p2SubmitScore=0)


Pavel


On Mon, Mar 14, 2011 at 1:58 PM, Ian Hardingham  wrote:
> Ah, sorry about this - my query is this one:
>
> SELECT * FROM multiturnTable WHERE rowid in (SELECT rowid FROM
> multiturnTable WHERE player1 ='?' UNION ALL SELECT rowid FROM
> multiturnTable WHERE player2 = '?') AND (complete=0 OR p1SubmitScore=0
> OR p2SubmitScore=0)
>
> And I only want to consider the last 5000 for any SELECTs from
> multiturnTable.
>
> Thanks,
> Ian
>
> On 14/03/2011 17:54, Adam DeVita wrote:
>> select id from table order by id desc limit 5000
>>
>>
>> Adam
>>
>> On Mon, Mar 14, 2011 at 1:52 PM, Ian Hardingham > > wrote:
>>
>>     Hey guys.
>>
>>     I have a table with an autoincrement primary ID, and as part of a
>>     select
>>     I would like to only take the 5000 "largest"/most recent ids.  Is
>>     there
>>     a quick way of doing this without having to get the max first?
>>
>>     Thanks,
>>     Ian
>>     ___
>>     sqlite-users mailing list
>>     sqlite-users@sqlite.org 
>>     http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>
>>
>> --
>> VerifEye Technologies Inc.
>> 905-948-0015x245
>> 151 Whitehall Dr, Unit 2
>> Markham ON, L3R 9T1
>> Canada
>>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] X most recent entries

2011-03-14 Thread Adam DeVita
Are you wanting the last 5000 from player 1 and  last 5000 from player 2?

You can even limit and order the sub selects.

Otherwise, I don't see the purpose of a union when OR would do.


SELECT * FROM multiturnTable WHERE rowid in (SELECT rowid FROM
multiturnTable WHERE player1 ='?' order by rowid desc limit 5000 UNION ALL
SELECT rowid FROM
multiturnTable WHERE player2 = '?' rowid desc limit 5000) AND (complete=0 OR
p1SubmitScore=0
OR p2SubmitScore=0)

I'm not sure of your context, but

SELECT * FROM multiturnTable WHERE rowid in
(SELECT rowid FROM
multiturnTable WHERE player1 ='?' AND (complete=0 OR p1SubmitScore=0
   OR p2SubmitScore=0) order by rowid desc limit 5000
UNION ALL SELECT rowid FROM
multiturnTable WHERE player2 = '?'  AND (complete=0 OR p1SubmitScore=0
  OR p2SubmitScore=0) rowid desc limit 5000)  AND (complete=0 OR
p1SubmitScore=0
OR p2SubmitScore=0)

so you get the last 5000 qualifying records of each, rather than the latest
5000 of each and then filtering out the disqualifying ones


On Mon, Mar 14, 2011 at 2:02 PM, Duquette, William H (318K) <
william.h.duque...@jpl.nasa.gov> wrote:

> Assuming that higher rowids really are later rowids, wouldn't adding "ORDER
> BY rowid DESC" and "LIMIT 5000" do the job?
>
> Will
>
>
> On 3/14/11 10:58 AM, "Ian Hardingham"  wrote:
>
> Ah, sorry about this - my query is this one:
>
> SELECT * FROM multiturnTable WHERE rowid in (SELECT rowid FROM
> multiturnTable WHERE player1 ='?' UNION ALL SELECT rowid FROM
> multiturnTable WHERE player2 = '?') AND (complete=0 OR p1SubmitScore=0
> OR p2SubmitScore=0)
>
> And I only want to consider the last 5000 for any SELECTs from
> multiturnTable.
>
> Thanks,
> Ian
>
> On 14/03/2011 17:54, Adam DeVita wrote:
> > select id from table order by id desc limit 5000
> >
> >
> > Adam
> >
> > On Mon, Mar 14, 2011 at 1:52 PM, Ian Hardingham  > > wrote:
> >
> > Hey guys.
> >
> > I have a table with an autoincrement primary ID, and as part of a
> > select
> > I would like to only take the 5000 "largest"/most recent ids.  Is
> > there
> > a quick way of doing this without having to get the max first?
> >
> > Thanks,
> > Ian
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org 
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> >
> >
> > --
> > VerifEye Technologies Inc.
> > <905-948-0015>905-948-0015x245
> > 151 Whitehall Dr, Unit 2
> > Markham ON, L3R 9T1
> > Canada
> >
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> --
> Will Duquette -- william.h.duque...@jpl.nasa.gov
> Athena Development Lead -- Jet Propulsion Laboratory
> "It's amazing what you can do with the right tools."
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] X most recent entries

2011-03-14 Thread Duquette, William H (318K)
Assuming that higher rowids really are later rowids, wouldn't adding "ORDER BY 
rowid DESC" and "LIMIT 5000" do the job?

Will


On 3/14/11 10:58 AM, "Ian Hardingham"  wrote:

Ah, sorry about this - my query is this one:

SELECT * FROM multiturnTable WHERE rowid in (SELECT rowid FROM
multiturnTable WHERE player1 ='?' UNION ALL SELECT rowid FROM
multiturnTable WHERE player2 = '?') AND (complete=0 OR p1SubmitScore=0
OR p2SubmitScore=0)

And I only want to consider the last 5000 for any SELECTs from
multiturnTable.

Thanks,
Ian

On 14/03/2011 17:54, Adam DeVita wrote:
> select id from table order by id desc limit 5000
>
>
> Adam
>
> On Mon, Mar 14, 2011 at 1:52 PM, Ian Hardingham  > wrote:
>
> Hey guys.
>
> I have a table with an autoincrement primary ID, and as part of a
> select
> I would like to only take the 5000 "largest"/most recent ids.  Is
> there
> a quick way of doing this without having to get the max first?
>
> Thanks,
> Ian
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org 
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
>
> --
> VerifEye Technologies Inc.
> 905-948-0015x245
> 151 Whitehall Dr, Unit 2
> Markham ON, L3R 9T1
> Canada
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

--
Will Duquette -- william.h.duque...@jpl.nasa.gov
Athena Development Lead -- Jet Propulsion Laboratory
"It's amazing what you can do with the right tools."

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] X most recent entries

2011-03-14 Thread Ian Hardingham
Ah, sorry about this - my query is this one:

SELECT * FROM multiturnTable WHERE rowid in (SELECT rowid FROM 
multiturnTable WHERE player1 ='?' UNION ALL SELECT rowid FROM 
multiturnTable WHERE player2 = '?') AND (complete=0 OR p1SubmitScore=0 
OR p2SubmitScore=0)

And I only want to consider the last 5000 for any SELECTs from 
multiturnTable.

Thanks,
Ian

On 14/03/2011 17:54, Adam DeVita wrote:
> select id from table order by id desc limit 5000
>
>
> Adam
>
> On Mon, Mar 14, 2011 at 1:52 PM, Ian Hardingham  > wrote:
>
> Hey guys.
>
> I have a table with an autoincrement primary ID, and as part of a
> select
> I would like to only take the 5000 "largest"/most recent ids.  Is
> there
> a quick way of doing this without having to get the max first?
>
> Thanks,
> Ian
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org 
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
>
> -- 
> VerifEye Technologies Inc.
> 905-948-0015x245
> 151 Whitehall Dr, Unit 2
> Markham ON, L3R 9T1
> Canada
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] X most recent entries

2011-03-14 Thread Adam DeVita
select id from table order by id desc limit 5000


Adam

On Mon, Mar 14, 2011 at 1:52 PM, Ian Hardingham  wrote:

> Hey guys.
>
> I have a table with an autoincrement primary ID, and as part of a select
> I would like to only take the 5000 "largest"/most recent ids.  Is there
> a quick way of doing this without having to get the max first?
>
> Thanks,
> Ian
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] X most recent entries

2011-03-14 Thread Ian Hardingham
Hey guys.

I have a table with an autoincrement primary ID, and as part of a select 
I would like to only take the 5000 "largest"/most recent ids.  Is there 
a quick way of doing this without having to get the max first?

Thanks,
Ian
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Optimization SQLite

2011-03-14 Thread Black, Michael (IS)
Try CodeBlocks
Cross-platform and works with gcc or MSVC or pretty much whatever.

I put in gcc 64-bit for it.

http://www.codeblocks.org/

Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate




From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Richard Hipp [d...@sqlite.org]
Sent: Monday, March 14, 2011 10:50 AM
To: Thiago Gregolon; General Discussion of SQLite Database
Cc: Fabiano Baldo
Subject: EXT :Re: [sqlite] Optimization SQLite

Email forwarded to the sqlite-users mailing list.

I use gcc and gdb and plain old text editor.  I am not able to recommend an
IDE since I don't use one.

On Mon, Mar 14, 2011 at 11:16 AM, Thiago Gregolon
wrote:

> Good morning,
>
> My name is Thiago from UDESC - Universidade do Estado de Santa Catarina -
> Joinville - Brazil.
> I'm doing a optimization to SQLite. I'm trying to reduce the time in any
> "select". Also I developed a program to run the SQLite and return the time.
> I just have problem to debug the SQLite, I'm doing using "printf and pause"
> and this is a hard way to debug a program that has more than 100.000 lines.
> I'm using Dev-C++ and the debugger didn't support this code. Could you
> recommend one good IDE to do that?
>
> Regards,
> Thiago Fernando Gregolon.
>
>
>


--
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Optimization SQLite

2011-03-14 Thread Richard Hipp
Email forwarded to the sqlite-users mailing list.

I use gcc and gdb and plain old text editor.  I am not able to recommend an
IDE since I don't use one.

On Mon, Mar 14, 2011 at 11:16 AM, Thiago Gregolon
wrote:

> Good morning,
>
> My name is Thiago from UDESC - Universidade do Estado de Santa Catarina -
> Joinville - Brazil.
> I'm doing a optimization to SQLite. I'm trying to reduce the time in any
> "select". Also I developed a program to run the SQLite and return the time.
> I just have problem to debug the SQLite, I'm doing using "printf and pause"
> and this is a hard way to debug a program that has more than 100.000 lines.
> I'm using Dev-C++ and the debugger didn't support this code. Could you
> recommend one good IDE to do that?
>
> Regards,
> Thiago Fernando Gregolon.
>
>
>


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] ANN: SQLite Maestro 11.3 released

2011-03-14 Thread SQL Maestro Group
Hi!

SQL Maestro Group announces the release of SQLite Maestro 11.3, a complete
Windows GUI solution for SQLite database management. The new version is
immediately available at
http://www.sqlmaestro.com/products/sqlite/maestro/

New features
=
1. SQLite Maestro has been successfully tested with the newest SQLite
versions. The latest available library (3.7.5) is now included into the
installation package.

2. Support for SQLite full-text search extension modules has been
implemented (both FTS3 and FTS4 are supported).

3. Now it's allowed to generate updatable views for your tables
automatically. Moreover, the Insert, Update, and Delete operations can be
enabled or disabled at your choice. It is possible to create such a view for
a single table or for several tables at once (even for all the tables in the
database).

4. Table Editor features an ability to upload files as BLOBs into a table.

5. Data Import: starting with this version it becomes possible to import
data from any database accessible via an ODBC driver or OLE DB provider,
such as SQL Server, MySQL, Oracle, MS Access, Sybase, DB2, PostgreSQL, etc.

6. Application Options: now it's possible to specify default directories for
data export/import/extract/etc to be used on database profiles creating.

7. Some minor corrections and fixes.

Full press-release (with explaining screenshots) is available at:
http://www.sqlmaestro.com/news/company/sqlite_maestro_11_3_released/

Background information:

SQL Maestro Group offers complete database admin and management tools for 
MySQL, Oracle, MS SQL Server, PostgreSQL, SQLite, DB2, Firebird, SQL 
Anywhere and MaxDB providing the highest performance, scalability and 
reliability to meet the requirements of today's database applications.

Sincerely yours,
The SQL Maestro Group Team
http://www.sqlmaestro.com


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users