Re: [sqlite] Virtual Table xBestIndex and NULL Search Conditions (Bug!)

2011-08-02 Thread Igor Sereda
Thanks, Simon - it's a bug then. Hope it will get pulled into the bug tracker. Igor Simon Slavin-3 wrote: > > > On 2 Aug 2011, at 1:10am, Igor Sereda wrote: > >> To my humble knowledge, operations with NULL have well-defined semantics, >> both in SQL-you-name-it

Re: [sqlite] Virtual Table xBestIndex and NULL Search Conditions (Bug?)

2011-08-01 Thread Igor Sereda
Simon, Michael - To my humble knowledge, operations with NULL have well-defined semantics, both in SQL-you-name-it standards and in SQLite. "A < B" may have three results - TRUE, FALSE and NULL. It doesn't matter whether you can make any sense of it - it's the spec ;) Therefore I'm trying to

Re: [sqlite] Virtual Table xBestIndex and NULL Search Conditions (Bug?)

2011-08-01 Thread Igor Sereda
ote: > > On Mon, Aug 01, 2011 at 12:34:33PM -0700, Igor Sereda scratched on the > wall: >> >> Hello, >> >> I'm seeing strange input given into xBestIndex method of my virtual >> table. >> >> I'm maintaining sqlite4java wrapper and I'm tryi

[sqlite] Virtual Table xBestIndex and NULL Search Conditions (Bug?)

2011-08-01 Thread Igor Sereda
Hello, I'm seeing strange input given into xBestIndex method of my virtual table. I'm maintaining sqlite4java wrapper and I'm trying to upgrade it from SQLite 3.7.4 to 3.7.7.1. A couple of failed tests uncovered that there's a problem when searching a simple virtual table with constraints that

Re: [sqlite] "Unable to Open DB" on Win-7 & Vista (64 bitt) on UAC -ON

2010-07-19 Thread Igor Sereda
I suspect the permissions set on DB file allow only Administrators to change it; and that requires escalation to Admin rights under UAC. It's likely that your DB file is located in C:\Program Files\yourapp. As a solution, you could relax permissions on the DB file upon installation, or, better,

Re: [sqlite] using test_intarray

2010-07-14 Thread Igor Sereda
ery that returns 100 000 entities -- without running the query itself. (This can be solved by creating a temporary table, inserting entity ids there and joining that table with the query - however, we're looking for a more efficient way.) Thanks! Igor Simon Slavin-3 wrote: > > > On

[sqlite] using test_intarray

2010-07-14 Thread Igor Sereda
Thanks for mentioning test_intarray! I'm now considering rewriting parts of our code because sqlite3_intarray_bind is more powerful than using sequences like ?,?,?... A question: does using a virtual table (or precisely virtual table from test_intarray) affect query optimizer? We have lots of

[sqlite] Documentation error in explanation of "IN subquery" (lang_expr.html)

2010-07-14 Thread Igor Sereda
On page http://www.sqlite.org/lang_expr.html : "When a SELECT is the right operand of the IN operator, the IN operator returns TRUE if the SELECT result contains no NULLs and if the left operand matches any of the values in the SELECT result." The part "SELECT result contains no NULLs" does not

Re: [sqlite] binding an IN

2010-07-12 Thread Igor Sereda
We have a similar task and we solve it by using a statement with lots of parameters SELECT * FROM table WHERE tableId IN (?, ?, ?, ?, ) The number of "?", let's call it N, is fixed, and set to ~100 -- tuned by measuring performance. When the actual number of parameters is less

Re: [sqlite] Re trieve Specific record number in one shot.

2010-07-09 Thread Igor Sereda
Would Select * From Product order by ProductName LIMIT 1 OFFSET 209 help? -- Igor Piyush Verma-3 wrote: > > Hello All, > > I want to navigate to specific position in table for example I want > row number 210 inspite of nevigating one by one how can get that row. > > One way could be

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Igor Sereda
My two cents, to complement other answers: leave it to the user. In case of a client-side GUI app, let the user run some maintenance action, like an OS has "defragment disk" action, or Outlook has "compact folders" action. In case of a server-side app, make a script or admin command to do that.

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Igor Sereda
> It's never time to VACUUM a database. This is an interesting statement. In our application, all tables get heavily fragmented with time (99% or more). I was considering VACUUM as a means to defragment, and, presumably, improve search performance. Was I misguided, and search performance does not

Re: [sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-24 Thread Igor Sereda
What compiler are you using? With GCC, you can use -m64 option. There must be a similar option in other compilers. -- Igor Sushil-15 wrote: > > Hi, > > I am looking for 64 bit libsqlite for AIX and Solaris. Is there a place > from > where I can > get them pre-built ? > > I have downloaded

Re: [sqlite] Oracle joins the SQLite Consortium

2010-06-23 Thread Igor Sereda
Greg, Thanks for the explanation. So it's Sleepycat license, ok, but we still can't use it in an application with proprietary code, right? It would be interesting to track the progress of SQLite/BDB. Roger Binns has noted some important issues, but granted those are solved, would you say

Re: [sqlite] Oracle joins the SQLite Consortium

2010-06-21 Thread Igor Sereda
Wow, that's interesting news. Berkeley DB is still GPL/commercial, I guess? I hope SQLite will keep on going under public domain, including its B-tree level. Also, here's an interesting statement in the BDB/SQLite announcement: > Thus, applications written to the SQLite version 3 API can

[sqlite] Yet another SQLite wrapper for Java

2010-06-15 Thread Igor Sereda
Hello. I have just posted our Java wrapper for SQLite as an open-source project: http://code.google.com/p/sqlite4java It's a thin JNI-based wrapper (no JDBC) with performance and stability being the key concerns. The library is targeted for desktop Java apps, but may be used in other Java

Re: [sqlite] Using cache stats to balance transaction size for optimal performance

2010-05-27 Thread Igor Sereda
Pavel, Thanks for the reply! I was afraid using pcache would be the only way :) As for this: Pavel Ivanov-2 wrote: > > No way. Cache won't ever grow just because you have large transaction. > It will only be spilled to disk and exclusive lock will be taken but > never trigger unbound

Re: [sqlite] Using cache stats to balance transaction size for optimal performance

2010-05-27 Thread Igor Sereda
Michael, Thank you for your suggestion! The problem with this approach is that N would not be a constant that we could tune. As I mentioned, the amount of updates may vary, depending on the data received. For example, one piece of data may lead to a single INSERT. So it would be safe and

[sqlite] Using cache stats to balance transaction size for optimal performance

2010-05-27 Thread Igor Sereda
I would like each transaction to be as large as possible, but not too large to cause cache growth or cache spill. We have a stream of incoming data, with each piece of data causing updates in SQLite database. The number of rows inserted/updated for each data record may vary. If I enclose each

Re: [sqlite] changes in cache spill locking since 3.5.9?

2008-11-19 Thread Igor Sereda
TECTED] [mailto:sqlite-users- > [EMAIL PROTECTED] On Behalf Of Dan > Sent: Tuesday, November 18, 2008 9:44 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] changes in cache spill locking since 3.5.9? > > > On Nov 19, 2008, at 12:27 AM, Igor Sereda wrote:

[sqlite] changes in cache spill locking since 3.5.9?

2008-11-18 Thread Igor Sereda
Hi, We have recently upgraded from 3.5.9 to 3.6.5 and one of tests that ensures certain SQLite behavior now fails. The test basically checks how cache spill is handled: SESSION THREAD 1SESSION THREAD 2 Open session Launch SELECT, keep stmt (assert SHARED lock is held)

[sqlite] sqlite3_interrupt and transactions

2008-04-02 Thread Igor Sereda
Greetings! I need to be able to interrupt a long-running query within a transaction. The question is: is it possible that changes made previously in this transaction will be affected? Example pseudo-code: 1. BEGIN IMMEDIATE 2. INSERT INTO x (x) VALUES ('y'); 3. SELECT long_running_query

[sqlite] How to determine current lock state

2008-03-22 Thread Igor Sereda
Hello, Is there a way to determine current lock state of a database? More specifically, I’d like to be able to tell whether the main database in the current session is under SHARED lock, or under RESERVED/PENDING/EXCLUSIVE lock. This is needed for unit tests and assertions. Thanks!

Re: [sqlite] blob incremental i/o constraints

2008-02-13 Thread Igor Sereda
The questions around sqlite3_blob_xxx methods that Roger brought up a couple of months ago are very interesting for me too, and I haven't seen any reply to Roger's message. (Roger - do you have any update?) As far as I can gather from the cited description of the problem, we should manually

RE: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Igor Sereda
My guess is that string comparison is taking place, and so "2008-01-01" is less than "2008-01-01 00:00:00". HTH, Igor -Original Message- From: Doug Van Horn [mailto:[EMAIL PROTECTED] Sent: Thursday, December 06, 2007 5:48 PM To: sqlite-users@sqlite.org Subject: [sqlite] Querying DATE

[sqlite] Transactional DDL

2007-11-27 Thread Igor Sereda
I noticed that CREATE TABLE works well within a transaction, which was a pleasant surprise. I can create a table and insert some rows in it, all quite ACIDly - wow! My question is, is that a declared contract or just a peculiarity that may disappear in future versions? I couldn't find any

RE: [sqlite] SQLite Manager Firefox extension

2007-11-27 Thread Igor Sereda
It does look good, but it's not quite usable with large databases though. For example, I couldn't wait till Browse and Search page showed a 2 million rows table -- it seemed to load everything into memory, eating up resources and causing Firefox to come up with "stop script" dialogs. Otherwise,

RE: [sqlite] Re: How to reset errcode

2007-11-24 Thread Igor Sereda
inal Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Friday, November 23, 2007 11:14 PM To: SQLite Subject: [sqlite] Re: How to reset errcode Igor Sereda <[EMAIL PROTECTED]> wrote: > From API docs: > > [quote] > The sqlite3_errcode() interface returns the nume

[sqlite] How to reset errcode

2007-11-23 Thread Igor Sereda
>From API docs: [quote] The sqlite3_errcode() interface returns the numeric result code or extended result code for the most recent failed sqlite3_* API call associated with sqlite3 handle 'db'. If a prior API call failed but the most recent API call succeeded, the return value from

RE: [sqlite] benchmarking UTF8 vs UTF16 encoded databases

2007-11-23 Thread Igor Sereda
> About the endieness, you don't need to know if you > don't care. SQLite handles it. SQLite does handle that, but what would be the performance loss when working with a UTF-16 encoded database, but with endianness opposite to the system? That's quite probable scenario, say, a database created

RE: [sqlite] Re: Any way to obtain explicit read lock?

2007-11-19 Thread Igor Sereda
: Monday, November 19, 2007 3:26 AM To: SQLite Subject: [sqlite] Re: Any way to obtain explicit read lock? Igor Sereda <[EMAIL PROTECTED]> wrote: > Suppose we need to read two tables in an isolated way, so no db change > is visible to the connection between first and second readout. >

[sqlite] Any way to obtain explicit read lock?

2007-11-18 Thread Igor Sereda
Suppose we need to read two tables in an isolated way, so no db change is visible to the connection between first and second readout. As far as I see, there's no such SQL or API for that at the moment. In other words: 1: // with the first step() the read lock is taken: 2: while(stmt1.step())

RE: [sqlite] Suggests for improving the SQLite website

2007-11-08 Thread Igor Sereda
I'm new to this list and to the SQLite website, so my feedback is more of the "first impression" kind. And that impression is: the site is ok. It is clear, simple, with almost anything I need reachable through one or two clicks. The things I would probably do is place a google search field

RE: [sqlite] Optimizing performance by moving large texts into a separate table

2007-11-07 Thread Igor Sereda
PROTECTED] Sent: Thursday, November 08, 2007 12:30 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Optimizing performance by moving large texts into a separate table "Igor Sereda" <[EMAIL PROTECTED]> wrote: > We have a database that can possibly grow into millions of rows. So

[sqlite] Optimizing performance by moving large texts into a separate table

2007-11-07 Thread Igor Sereda
We have a database that can possibly grow into millions of rows. Some tables have TEXT fields, which may store texts of signigicant length. All other data is mostly numeric values. We have a thought of moving all large texts into a separate table, and replacing text_column with text_id in the