Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread Keith Medcalf
While that is nice, it is likely completely irrelevant. The issue appears to be the flamboyant conversion of data being performed by dotSnot (.NET). The fact that data can be stored in several different formats inside the database, and then converted to what dotSnot calls a "GUID" is all very

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread Simon Slavin
On 15 Feb 2020, at 8:12pm, J Decker wrote: > memcmp is harder than strcmp? > and with blob I suppose you don't have 'if UTF8 or UTF16 do > different things' so should compare slightly faster? It's not cut-and-dried, but you can take things into consideration. Once data is in a database it

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread J Decker
On Fri, Feb 14, 2020 at 7:36 AM Simon Slavin wrote: > On 14 Feb 2020, at 2:59pm, Andy KU7T wrote: > > > Do you suggest me keeping storing TEXT (and declaring the column as TEXT > instead of GUID) or storing and declaring BLOB (and remove HEX)? > > TEXT. Makes sorting and searching easier. >

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread Barry Smith
Regardless of whether you decide to store GUIDs as text or binary, things will be easier if you set your connection string appropriately. BinaryGUID is the parameter you want to change. See https://www.connectionstrings.com/sqlite-net-provider/store-guid-as-text/ For performance binary is

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Simon Slavin
On 14 Feb 2020, at 2:59pm, Andy KU7T wrote: > Do you suggest me keeping storing TEXT (and declaring the column as TEXT > instead of GUID) or storing and declaring BLOB (and remove HEX)? TEXT. Makes sorting and searching easier. ___ sqlite-users

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Andy KU7T
Thanks for the response. Do you suggest me keeping storing TEXT (and declaring the column as TEXT instead of GUID) or storing and declaring BLOB (and remove HEX)? I think both cases would work, but for performance, does it matter? AS long as my index is binary collated, it probably does not,

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Radovan Antloga
In SQLite type guid does not exist. Look at this documentation: https://www.sqlite.org/datatype3.html Affinity for guid would be BLOB but in trigger you store TEXT. I do not use .NET but I think you should use different parameter type. I would use TEXT type. Regards R.A. On 14.02.2020 15:09,

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread radovan5
In SQLite type guid does not exist. Look at this documentation: https://www.sqlite.org/datatype3.html Affinity for guid would be BLOB but in trigger you store TEXT. I do not use .NET but I think you should use different parameter type. I would use TEXT type. Regards R.A. On 14.02.2020 15:09,

[sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Andy KU7T
Hi, I am having trouble searching for a Guid. I think some conversion is missing. I wonder if someone can point me to the error… Column: [ID] GUID(16) Index: CREATE UNIQUE INDEX [ID_INDEX] ON [DXLOG]([ID] COLLATE [BINARY] ASC); Trigger: CREATE TRIGGER [AUTOGENERATE_ID] AFTER INSERT ON [DXLOG]