Jim Dodgen <[EMAIL PROTECTED]> wrote:
>
> 2. get the optimizer to ignore indexes that I know cannot help
>
>I do this in the where clause, by adding a zero or concatenating a ""
> depending upon the data type
>
> examples:
>
> where sex = "M"
> changed to
> where sex||"" = "M"
I
As has been stated in the past SQLite is a small foot print RDBMS, one
of the things keeping it small is that it does not have a large query
optimizer.
One of the things that can happen is if you have lots of indexes the
optimizer may pick something non optimum
My tricks are as follows:
1.
Same is true for Oracle 8i/9i/10g.
E.
--- Rob Lohman <[EMAIL PROTECTED]> wrote:
> Microsoft SQL seems to use the column names from the
> first select. So that would be "a, b" in your example.
>
> Rob
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Sqlite-users"
> Sent: Sa
Oracle 8i:
SQL> select 1 as a, 2 as b from dual UNION ALL select 3 as b, 4 as a from dual;
A B
-- --
1 2
3 4
SQL> select * from (select 1 as a, 2 as b from dual UNION ALL select 3 as b, 4
as a from dual) where b = 3;
Yeah I did. sorry about the rushed typing.
DRH managed to sort it out for me. I had imported a ver 2 database to
version 3 and changed a time values to integers, but forgot to change the
column to integer.
Lloydie-T
- Original Message -
From: "Kurt Welgehausen" <[EMAIL PROTECTED]>
T
"Lloyd Thomas" <[EMAIL PROTECTED]> wrote:
> if use
> SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10;
> I get 0 results
You DID specify a table in your actual queries, didn't you?
select * from tbl;
t x y
-- -- --
1
On 3/25/06, Joe Wilson <[EMAIL PROTECTED]> wrote:
> Since we're on this topic, what do other databases return for these queries?
>
> sqlite> select 1 as a, 2 as b UNION ALL select 3 as b, 4 as a;
> a|b
> 1|2
> 3|4
mysql> select 1 as a, 2 as b UNION ALL select 3 as b, 4 as a;
+---+---+
| a |
Markus Kolb <[EMAIL PROTECTED]> wrote:
>
> I am using autocommit and I call sqlite3_exec with a SQL-INSERT inside a
> sqlite_callback()-function which gets called for each row of a
> SQL-SELECT (sqlite3_exec, too).
>
> So again my question what can I do to get the data written to DB file or
> why
[EMAIL PROTECTED] wrote:
> Markus Kolb <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I have some questions to autocommit mode of SQLite 3.3.4 and its
>> transactions.
>>
>> Did I understand it right that new or changed row data is only written
>> to disk when the db connection is closed with sqlite3_c
Since we're on this topic, what do other databases return for these queries?
sqlite> select 1 as a, 2 as b UNION ALL select 3 as b, 4 as a;
a|b
1|2
3|4
sqlite> select * from (select 1 as a, 2 as b UNION ALL select 3 as b, 4 as a)
where b = 3;
b|a
3|4
sqlite> select * from (selec
"Lloyd Thomas" <[EMAIL PROTECTED]> wrote:
> I am not sure if I am being crazy, but I seem to be getting a wierd result
> when using 'BETWEEN'.
>
> if use
> SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10;
> I get 0 results
> but if I do
> SELECT count(call_id) as num_rows WHERE
Go back to my original problem if I change 'between 6 and 10' to 'between 6
and 9', I get the expected results.
SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 9;
232
Am I finding a bug or is my syntax incorrect?
- Original Message -
From: "Lloyd Thomas" <[EMAIL PROTECT
If i do
SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 10 and 6;
I get 633 results.
Is that normal?
- Original Message -
From: "Lloyd Thomas" <[EMAIL PROTECTED]>
To:
Sent: Saturday, March 25, 2006 3:48 PM
Subject: [sqlite] Wierd between results
I am not sure if I am being
On 3/25/06, Rob Lohman <[EMAIL PROTECTED]> wrote:
> Microsoft SQL seems to use the column names from the
> first select. So that would be "a, b" in your example.
This seems to be the case for current stable versions of Firebird,
Postgres and MySQL as well.
--
Nemanja Corlija <[EMAIL PROTECTED]>
> Perhaps a better fix is this:
>
> struct Mem {
>i64 i;
>double r;
>char *z;
>int n;
>u16 flags;
>u8 type;
>u8 enc;
>void (*xDel)(void *);
>union {
> long double notUsed1;
> char zShort[NBFS];
>};
> };
>
> The compiler would then (hopefully) in
I am not sure if I am being crazy, but I seem to be getting a wierd result
when using 'BETWEEN'.
if use
SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10;
I get 0 results
but if I do
SELECT count(call_id) as num_rows WHERE ring_time = 7;
I get 39 results
SELECT count(call_id) a
Markus Kolb <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have some questions to autocommit mode of SQLite 3.3.4 and its
> transactions.
>
> Did I understand it right that new or changed row data is only written
> to disk when the db connection is closed with sqlite3_close?
No. Data is guaranteed t
Hello,
I have some questions to autocommit mode of SQLite 3.3.4 and its
transactions.
Did I understand it right that new or changed row data is only written
to disk when the db connection is closed with sqlite3_close?
Did I understand it right that after a transaction commit, autocommit is
enabl
Microsoft SQL seems to use the column names from the
first select. So that would be "a, b" in your example.
Rob
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Sqlite-users"
Sent: Saturday, March 25, 2006 3:45 PM
Subject: [sqlite] Column names in a UNION
Who can tell me what th
Who can tell me what the "correct" column names should be
for a UNION. For example:
SELECT a, b FROM t1 UNION SELECT x, y FROM t2;
The result set of the query above has two columns. Should
those columns be named a and b or x and y?
Does anybody know what the SQL standard says? Do all the
ot
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> >
> > Perhaps the following definition of Mem would work better:
> >
> > struct Mem {
> >u16 flags;
> >u8 type;
> >u8 enc;
> >char *z;
> >int n;
> >i64 i;
> >double r;
> >char zShort[NBFS];
> >void (*xDel)(void
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
>
> A side note: from previous experience with some other DB engines I
> know that sometimes alignment issues are not minor at all. They can be
> deeply in on-disk format and sometimes it is difficult to avoid them
> without having to change the on-di
>
> The Mem structure does not appear on disk or in any API (except
> as the opaque structure pointer sqlite3_value*) so it can be
> revised as needed to force 16-byte alignment. Perhaps
> the following definition of Mem would work better:
>
> struct Mem {
>u16 flags;
>u8 type;
>u8
>
> From your subsequent posts, I presume that you are figuring out
> for yourself that there are no showstoppers, though perhaps some
> minor alignment issues on ia64.
>
> I personally test each release on ix86 Linux (currently SuSE 9.2),
> on Win2K (running under VMWare on the afore mentioned SuS
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> We consider using SQLite for some of our applications and I would like to a=
> sk
> whether there are existing cases of using SQLite on the following OSes:
>
> - Mac
> - Windows
> - Linux
>
> and with following architectures
>
> - x86
> -
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> I use those that come with the distribution. Since it's one of the
> latest distros (Red Hat EL 4 Update 2), it's not that archaic:
>
> $ rpm -qa | grep tcl
> tcl-devel-8.4.7-2
> tcl-8.4.7-2
That should be sufficient.
> > >
> > > printf-8.1...
> >
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> As far as I understand, this fix will take the problem away only
> because SumCtx is bigger now. But the problem with
> sqlite3_aggregate_context will remain: the pointer returned will not
> be aligned properly if the size of the context is less or e
As far as I understand, this fix will take the problem away only
because SumCtx is bigger now. But the problem with
sqlite3_aggregate_context will remain: the pointer returned will not
be aligned properly if the size of the context is less or equal 32
bytes. Am I correct?
On 3/25/06, [EMAIL PROTEC
I use those that come with the distribution. Since it's one of the
latest distros (Red Hat EL 4 Update 2), it's not that archaic:
$ rpm -qa | grep tcl
tcl-devel-8.4.7-2
tcl-8.4.7-2
On 3/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> "Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> > Hi,
>
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I don't know whether it's been already reported or not, so anyway.
> There are places in SQLite where unaligned access exception is
> generated on Itanium. The unaligned access means that someone tries to
> read or write memory crossing 8-by
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm running SQLite 3.3.4 tests suite on Linux (Red Hat 4 Update 2)
> Itanium box. I got the following test failures:
>
> 4 errors out of 24863 tests
> Failures on these tests: printf-8.1 printf-8.2 printf-9.5 types3-1.3
>
> Information on
Also, I've verified that this is exactly the reason of unaligned
accesses by making SumCtx bigger so that it doesn't fit into NBFS
bytes. After that I was able to execute all tests without unaligned
access exceptions. But those printf-8.1 printf-8.2 printf-9.5
types3-1.3 still fail, so it is not re
Hi,
I don't know whether it's been already reported or not, so anyway.
There are places in SQLite where unaligned access exception is
generated on Itanium. The unaligned access means that someone tries to
read or write memory crossing 8-bytes boundary. Usually this occur as
a result of pointers ca
Hi,
I'm running SQLite 3.3.4 tests suite on Linux (Red Hat 4 Update 2)
Itanium box. I got the following test failures:
4 errors out of 24863 tests
Failures on these tests: printf-8.1 printf-8.2 printf-9.5 types3-1.3
Information on the console:
printf-8.1...
Error: integer value too large to rep
Hi,
I compile SQLite 3.3.4 on Linux ia64 box and noticed the following
warnings during the compilation:
./src/table.c: In function `sqlite3_get_table':
./src/table.c:149: warning: cast to pointer from integer of different size
./src/table.c: In function `sqlite3_free_table':
./src/table.c:194: wa
35 matches
Mail list logo