Robert Cemper · Feb 2, 2018 go to post

To my understanding the main purpose of introducing %INLIST in our SQL was
to have a more handy option than the classic IN (....)

%INLIST takes a Single $LISTBUILD()  as parameter with a Variable number of values that you pass at runtime by only 1 "?"

while IN (p1,p2,p3,p4)   or better IN (?,?,?,?)  requires a fixed static number of parameters during execution. 
so you have to know the maximum number of values ahead when you create your query
and eventually to fill unused parameters by some impossible value to feed the query
 

Robert Cemper · Feb 1, 2018 go to post

I wasn't sure.
therfore:  .... some kind of code optimizer eventually might run.

I remembered a discussion around Java JIT compiler and XEP being faster on globals that pure COS.
But I can't remember any result or consequences.

Robert Cemper · Feb 1, 2018 go to post

I had the issue short after an update of Eclipse.
I fixed it by re-installing the glassfish stuff  (whatever that might be) explicitly from Marketplace.

Robert Cemper · Feb 1, 2018 go to post

Query 1 Example 1 could be marginally faster by less line terminations and less command dispatch:
But as this will be compiled some kind of code optimizer eventually might run.

Query2 Example1 is faster by less line terminations and less command dispatch.
BUT:  Both cases aren't the place to win benchmarks. Rather look for Global access , SQL optimizing, ....

Robert Cemper · Feb 1, 2018 go to post

query 1 misses a variant:

set $lb(a,b,c,d,e,f)=$lb("345","arun","kumar","hi","yello","orange")

query 2,example 2 should be 

I a=2 SET R="Arun"
Robert Cemper · Feb 1, 2018 go to post

Hi Ben,
- I like the idea of external samples. That offers definitely more flexibility .
- DOCUMATIC is unchanged and works local!  That's important. OK 
- JDBC: it isn't visible in Custom Install.  You only see xDBC -> ODBC .   
   Not an issue, rather a surprise. The .jar are  where they used to be before.

I'm really happy that we finally can get out of old chains imposed by 40yrs (DSM-11 and others) backward compatibility .

Robert  

Robert Cemper · Jan 31, 2018 go to post

- no DOCBOOK

- no SAMPLES

- no JDBC Driver in install
but there  is  C:\InterSystems\IRIS\dev\java\lib\JDK18\isc-jdbc-3.0.0.jar  .....

- and a very small icon for csystray.exe in Win  

Robert Cemper · Jan 31, 2018 go to post

I wonder if it would be possible to have a more rigid syntax check (now in Atelier / and switchable)
to enforce all kind of brackets (eg: condition like in JS). 

I tried to recommend this while teaching COS myself.
With very limited success as some Dinos ignored it.
 

Robert Cemper · Jan 31, 2018 go to post

rewrite of comment:

if this is something like

SELECT people.name, holiday.date, people.ID||'^'||holiday.ID as UNIQ
FROM people JOIN holiday
ON people.country = holiday.country

Then the bolded expression should not be longer than your 50 Char.

IF you use CachéStorage
ID is always a unique positive Integer (1.... 19digits)  and you can always disassemble it by the separator.

Robert Cemper · Jan 31, 2018 go to post

NO NEVER!
ID in CacheStorage is an "autoincrement" positive Integer (1...2**64-1)    ~19 digits decimal.

AND is never reused.
And you can split this construct in the original pieces if required

Robert Cemper · Jan 31, 2018 go to post

totally right!!
there is more old code out than you could / would like to imagine
And Caché is backward compatible for 40 years (since DSM V1)

New developers should not write it. But they need to understand it. Or at least recognize it.
It's pretty similar to reading the bible in original language with no translation. 

Robert Cemper · Jan 31, 2018 go to post

if this is something like

SELECT people.name, holiday.date, people.ID||'^'||holiday.ID as UNIQ
FROM people JOIN holiday
ON people.country = holiday.country

Then the bolded expression should not be longer than your 50 Char.
IF you use CachéStrorage

Robert Cemper · Jan 30, 2018 go to post

Show Active Key Bindings  is in  HelpMenu

And as this is based on Eclipse some keys a different then in Studio.
Eventually you may produce your private setup using Preferences. 

Robert Cemper · Jan 30, 2018 go to post

Assuming that you did not disable Journaling for the critical CACHE.DAT
you can take a look into Mgmt Portal / System Operation / Journal
There you click on PROFILE and sort by Size:
This gives you the fastest moving parts.
And though it also contains updates your fastest GROWING globals will leave their traces there.

In a next step you may analyze the Journal itself filtered by CACHE.DAT and SET operation
but that may take more time and effort.

Robert Cemper · Jan 29, 2018 go to post

suggested steps:

#1)Add   Property Experiment As %String;   to     Class SCHED.TracerEntry

#2) Write a Utility  Class to move  the existing content from  SCHED.SchedEntry.Experiment in to the all List entries.

#3)
If you are satisfied and all methods access the new location of Experiment​
You may remove all old content of  SCHED.SchedEntry.Experiment . Set it to ""
and set the property to INTERNAL, PRIVATE or just delete SCHED.SchedEntry.Experiment . BUT don't touch the storage map! 

This is not a necessary step but just kind of clean up.

Robert Cemper · Jan 29, 2018 go to post

NOTE:  I had commented out the two &html lines in the Testing Method... and doing a Ctrl-O still work.

Most likely your browser displays a cached version.
Clean all caches on the way to browser and you will see the changes. It's a principle issue.
with <input type="file" /> you select a file name local to your browser. That's just pure HTML.

And what you have in hands is a file reference. Not the file itself.
So what you may do next is to SUBMIT it to server.
 
But scanning your menu you expect to open, modify, copy, ...  
That's nothing to be done from Browser but by a local application.

 

Robert Cemper · Jan 25, 2018 go to post

the only effect is a smaller resultset of the subquery.
it doesn't speed up the inner collection /sort process (+ inner  WHERE ) before TOP is applied.

I'm with you it's not intuitive and I think TOP ALL could be a default.  But that's not happening. 

Robert Cemper · Jan 25, 2018 go to post

In principle OK.
But also ODBC or JDBC connection have timeouts limits. Though  they are typically longer than CSP.

Robert Cemper · Jan 25, 2018 go to post

Yeah!
it's not only no timeout but you can easy debug all your SQLCOMPUTED  code.

Robert Cemper · Jan 24, 2018 go to post
select *, %vid from (select * from UACCESSRIGHT order by RIGHTID) 
failed on wrong syntax

If you use ORDER BY in a SubSELECT you have to add a TOP clause as well. e.g.

select *, %vid from (select TOP ALL * from UACCESSRIGHT order by RIGHTID)  where %vid between 10 and 20

Robert Cemper · Jan 24, 2018 go to post

Postcondition is preferred
especially  quit:error     or   continue:ignore

for i=1:1:5 write i," "     is as fine as    for i=1:1:5 {  write i," " } write "end"

but this is really bad:

         f i=1:1:5 d  w "? "
          .w i," "
         w "end"
Robert Cemper · Jan 22, 2018 go to post

I see 2 options

#1) 

add the ChangeItem holding the last change in addition to your list of Objects.
and add the appiopriate indices.
like this:

Class Rick.ChangeList Extends %Persistent
{
  Property Title As %String;
  Property Changes As list Of Rick.ChangeItem;
/// Last change added to list
  Property Last As Rick.ChangeItem;
  Index xlast On Last.Change;
}

 

This looks simple but it requires that any program that adds a change also 
updates the "Last" property.
If this isn't feasible you may use %OnBeforeAddToSaveSet() or similar to insert you "Last" object during %Save().
It requires more space on disk and is not redundant.
It doesn't generate entries for existent records.This requires a special update exercise.

#2)

Add the property to be indexed as SqlComputed and index it.
This is not so speedy but gives you the flexibility not just check the last element
and has no impact or dependency on any existing code using it.

Class Rick.ChangeList Extends %Persistent
{
  Property Title As %String;
  Property Changes As list Of Rick.ChangeItem;
  Property lastDate As %TimeStamp [ Calculated, SqlComputed ,
          SqlComputeCode = { set {*} = ##class(Rick.ChangeList).ChangeDate({ID}) }];
Index xdate On lastDate [ Data = lastText ];
}
ClassMethod ChangeDate(ID As %Integer)
{
  set obj=##class(Rick.ChangeList).%OpenId(ID)    
     ,item=obj.Changes.GetAt(obj.Changes.Count())
   quit item.Change
}