Support Forums > OD/WEK & JAVA API
ODWek REST - Search with SQL - Segment start and stop date
Andreas Baaserud Hauge:
Hi,
In the documentation https://cmod.wiki/dox/RESTapiDoc/CMOD_10_5_REST_API_Documentation.html chapter 3.5.2. Search with SQL it says
--- Quote ---When using search with SQL, it is imperative you include a segment start and stop date when available. The format of the start/stop dates is %Y-%m-%d. Failure to include a segment feild will result in a search across all application group data tables severly impacting system performance.
--- End quote ---
My question is, how do I know what segment start and stop date to use?
--- Quote ---Failure to include a segment feild will result in a search across all application group data tables severly impacting system performance.
--- End quote ---
Hence that quote, it seems like I should be able to know what segment start and stop date I can use for a query.
In this sample request, the startdate and stopdate spans over 27 years. 27 years of records seems a bit odd to search through if the point of segment startdate and stopdate is to narrow the search down to increase performance.
--- Code: ---POST /cmod-rest/v1/hits/ HTTP/1.1
usi-date: 2020-02-25T00:31:30Z
Authorization: CMODSharedKey externpool1-P0mFoCU5H83lN9uQcRUA:5au9U9epefygVH22mKfR8yGkS+XiA0D8CDmcOvZrt58=
Content-Type: application/json; charset=UTF-8
Host: localhost
Content-Length: 191
{
"startdate" : "1993-01-01",
"stopdate" : "2020-02-11",
"query" : "where name like 'VILL%'",
"folder" : "Baxter Bay CC Statements",
"applicationgroup" : "Baxter Bay Credit"
}
--- End code ---
rjrussel:
Andreas,
This is a bad example. Will update the docs to make this more meaningful.
Thank you,
Rob
Andreas Baaserud Hauge:
Thanks Russel,
Do you mind also explain how we can use the segment startdate and stopdate?
I dont get how I should get that value to make the search more efficient.
rjrussel:
Why do you need to search with SQL?
Andreas Baaserud Hauge:
Good question, is it more efficient to not use the Search with SQL and rather use /cmod-rest/v1/hits/<folder> ?
Cant see we specify segment startdate and stopdate in /cmod-rest/v1/hits/<folder> search.
in the background maybe the segment startdate and stopdate are used ? do you know what those values would typically be?
Navigation
[0] Message Index
[#] Next page
Go to full version