An interesting pattern around unique indices came up recently (in internal discussion re: isc.rest) and I'd like to highlight it for the community.
As a motivating use case: suppose you have a class representing a tree, where each node also has a name, and we want nodes to be unique by name and parent node. We want each root node to have a unique name too. A natural implementation would be:
I'd like to know if there are any issues if an index is inserted into a table without running the %BuildIndices() method.
It's important to note that data inserted before the index is not important for retrieval, so it's not a problem data inserted before the index don't show up in queries.
The reason why I'm asking this is that I'd like to avoid index reconstruction on big tables which I need to inser such index.
Image search like Google's is a nice feature that wonder me - as almost anything related to image processing.
A few months ago, InterSystems released a preview for Python Embedded. As Python has a lot of libs for deal with image processing, I decided to start my own attemptive to play with a sort of image search - a much more modest version in deed :-)
Triggered by a question placed by @Kurro Lopez recently I took a closer look at the indexing of collections. My simple test setup is a serial class and a persistent class with a list of this serial.
A VIEW in SQL is basically a prepared SQL statement. It has to be executed and assembled like any other SQL query. MATERIALIZED VIEW means that the content is collected before hands and can be retrieved rather fast. I saw the concept first with my favorite competitor named O* and they made a lot of noise about it. { favorite: because I could win every benchmark against them }
I'm using Cache SQL and want the ability to choose a specific index.
I've boiled the problem down to one table and simplified the query down to
SELECT * FROM Registration.PatResp WHERE SchedApptNum=8450022
SchedApptNum is indexed, but instead of using that column, "Show Plan" indicates that it's looping through the entire Registration.PatResp table on Id (the primary key for the table).
Is there a way to get a good performing index on a date field? I have tried various date property indexes and the query plan is always in a pretty high range. Below are query plan result values I have observed:
StartDate > '2019-12-01' --cost = 699168 StartDate = '2019-12-21' --cost 70666 StartDate between '2019-12-21' and '2019-21-28' --cost = 492058
Our team is reworking an application to use REST services that use the same database as our current ZEN application. One of the new REST endpoints uses a query that ran very slowly when first implemented. After some analysis, we found that an index on one of the fields in the table greatly improved performance (a query that took 35 seconds was now taking a fraction of a second).
I've stumbled on some unexpected behavior, and decided to check with you if this is normal. Basically, I'm rebuilding indices and the result is not journaling (which leads to missing indices at shadow server).
The $ZV is "Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2015.2.1 (Build 705U) Mon Aug 31 2015 16:53:38 EDT"
I have an example class
Class tmp.A As %Persistent;
Index IP1 On P1;
Property P1 As %String;
for example there is one object which have P1 = 1, so
We have been storing raw messages in a MySQL database for DR and ad hoc purposes. We are thinking of using an Ensemble instance as our data lake instead. We could segregate the source data by namespace or by global. But either way we'll want a custom global to index the data for data retrieval performance purposes.
I know of the existance of (ELEMENTS) to create an index from a list, but I actually would like to index the content of an element of a list. Is it possible?
My scenario:
Class: Property Test As list of TestList;
Test.List: Property Name As %String; Property Surname As %String;
I would like to have an index based on the TestList.Name. If I try using
Index NewIndex On Test(ELEMENTS)
it will create an index with Name and Surname in it, but I just want to have an index with the name. Is it possible?
I have a persistent class that represents cities across the United States. It is below, but basically has a City Id, Name, Lat, Lon and a few other unimportant fields for this issue. Anytime I attempt to query on the Latitude or Longitude it immediately returns no results. My first thought was that it was a casting issue so I tried casting both sides to floats, ints, even strings and in all cases it immediately comes back with no results. I then decided to cast it to a string and attempt a like statement thinking it might be something about how floats are handled, but still no joy. Any
I'm facing a specific sort problem. There are several thousands of articles sold all over. Users expect to get a description in local language sorted by their specific collation.
I have problem with index NULL value. Unique index doesn't work for this case. If I use insert and one of parameter is "NULL". Message of constraint doesn't appear and row is inserted into table successfully. How Can I use index with NULL?
I just have introduced new tag Indexing which relates to articles and questions on how to introduce, manage and increase performance with Indexing on Caché Objects.
create index UIX on MyTable (Column1) where Column1 is not null
2. What happens if we add an index on a property that is NOT required, meanning that not all records will be indexed because we do not allow null subscripts ?