Re: [sqlite] Possible bug with union and join.

2016-12-25 Thread Adrian Stachlewski
Simon, Id field in one table is defined as TEXT, because there are stored identifiers which can be numeric or text mostly like in the example ("4", "4,5", "10-1") (to be precise this map is created on the fly by concatenating some ids and names from another tables). In second table there are

Re: [sqlite] count registers in a table

2016-12-25 Thread Simon Slavin
On 24 Dec 2016, at 10:52am, MONSTRUO Hugo González wrote: > Which is the fastest way to count the records of a table. ? And records > that meet a condition? SELECT COUNT(*) FROM MyTable SELECT COUNT(*) FROM MyTable WHERE a = b There is special optimization for

[sqlite] count registers in a table

2016-12-25 Thread MONSTRUO Hugo González
Hi, Which is the fastest way to count the records of a table. ? And records that meet a condition? regards ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Possible bug with union and join.

2016-12-25 Thread Simon Slavin
On 23 Dec 2016, at 4:55pm, Adrian Stachlewski wrote: > Id field in one table is defined as TEXT, because there are stored > identifiers which can be numeric or text mostly like in the example ("4", > "4,5", "10-1") (to be precise this map is created on the fly by >

Re: [sqlite] Possible bug with union and join.

2016-12-25 Thread Adrian Stachlewski
Fortunately names of columns are much more transparent and documented in our internal specification. 'Id' was created only for example, but thanks for advice :) Adrian 2016-12-25 13:44 GMT+01:00 Simon Slavin : > > On 23 Dec 2016, at 4:55pm, Adrian Stachlewski