SQL

Syndicate content 27 

Presenter: Anton Umnikov
Task: Run SQL queries quickly on huge amounts of data
Approach: Use a shared-nothing architecture to leverage a cluster of small, cost-effective servers
 

Explains how a shared nothing architecture allows you to leverage a cluster of small, costeffective servers to serve query results that would have taken much longer on a single, big and expensive box. This brings affordable horizontal scalability.

 

Content related to this session, including slides, video and additional learning content can be found here.

+ 1   0 1
0

comments

178

views

+ 1

rating

Presenter: Anton Umnikov
Task: Identify your slowest SQL queries and tune them for better performance
Approach: Use InterSystems’ query profiling and analysis tools. Discuss how system configuration can affect performance
 

This session will show you how you identify the weakest link in your application SQL and introduce you to the fine art of tuning those queries. To do this we will take a look at InterSystems query profiling and analysis tools, as well as how system configuration can impact SQL performance.

Problem: Obscurity on how our SQL engine works

 

Content related to this session, including slides, video and additional learning content can be found here.

0   0 2
0

comments

130

views

0

rating

If I have defined a class query in one of my classes and I want to use that query from a method of another class, what are the pros and cons of using the %SQL.Statement interface versus the %Library.ResultSet interface?

I believe %SQL.Statement is the newer interface.

So if the old way is:

USER>s rs=##class(%Library.ResultSet).%New("%Library.File:FileSet")
 
USER>s sc=rs.Execute("c:\s\","*.txt")
 
USER>w sc
1
USER>while rs.%Next() {w !,rs.Data("Name")}

...

then the new way is

Last comment 14 March 2016
+ 2   0 9
828

views

+ 2

rating

Hello! 

I'm trying to run a simple SQL query in atelier but it complains about the manager.  I'm not sure if this is the best way to do it but here is what I got so far:

 



	ZNSPACE "User"
	
	SET domId = 1
	SET flister=##class(%iKnow.Source.SQL.Lister).%New(domId)
	SET myloader=##class(%iKnow.Source.Loader).%New(domId)
 
 
	SET myquery="select top(10) EntityValue, CorpusFrequencyAsRelation, CorpusSpreadAsRelation from %iKnow_Objects.EntityUnique  WHERE DomainId = 1 ORDER BY  CorpusFrequencyAsRelation desc"
	SET idfld="EntityValue"
	SET grpfld="CorpusSpreadAsRelation"
	SET dataflds=$LB("CorpusSpreadAsRelation")

	SET stat=flister.AddListToBatch(myquery, idfld, grpfld, dataflds)	
		IF stat '= 1 {WRITE "The lister failed: ",$System.Status.DisplayError(stat) QUIT }
	SET stat=myloader.ProcessBatch()
		IF stat '= 1 {WRITE "The loader failed: ",$System.Status.DisplayError(stat) QUIT }


And the error I get

Last comment 14 March 2016
+ 1   0 7
0

answers

212

views

+ 1

rating

What is the recommended approach to handle the following scenario: Large number of HL7 messages are serviced via Ensemble. Those messages are then transformed and routed to an Operation which calls a web service which does a number of different activities. If will do address normalization, location geo coding, MPI lookup and resolution, and insert into a SQL Server database to stage for an analytics product. Unfortunately all of this work takes time and the first thing that happens in the web service is a lock taken out on the Patien in SQL Server. Each call can take seconds where the message input is taking milliseconds. This starts to impact the operation queue as the soap calls can be blocked by the locks. The Ensemble operation is waiting on the web service to return.

Last comment 4 March 2016
+ 1   0 5
0

answers

383

views

+ 1

rating

I am pleased to announce the next 2016.2 field test kit, 2016.2.0.595.0.

It may look like a slow week, with less than fifty changes having been checked in, but this kit includes the following fixes to problems found by you, the ones running the kits in the field:

  • ALE2845, which fixes the cachejdbc.jar version
  • JN1637, which fixes an issue that blocked debugging Atelier when used in conjunction with Kerberos
  • DLP3508, which fixes a JSON issue with $compose()

The rest of the fixes have been spread among different areas of the product, chief among them DOCUMENT Data Model, SQL and Atelier.

Please download the kit and give it a try; the latest field test of 2016.2 is available HERE.  And, as always, we welcome your feedback.

Steve Glassman, Director of QD

+ 3   0 3
0

comments

140

views

+ 3

rating

Caché Monitor is a database\sql tool primarily for InterSystems Caché but can also connect to MS SQL Server, MS Access and more databases. Within Caché Monitors Server Navigator you see all available Namespaces on your Caché Servers. No need to know the name of the Namespace, no need to configure many many JDBC Connections by hand. Just click on the namespace and see all objects like tables, views, classes and more...

There is a beta build available with some new features: A main new feature in this build is called Query Cloud. With this feature you can write SQL Statements across multiple Caché Servers; Namespace and combine (SQL JOIN!) this data with other datasources like SQL Server; MS Access or simple CSV files.

Last comment 18 February 2016
+ 3   0 1
1446

views

+ 3

rating

Here is my original query:

SELECT EventType, InitiatedAt, COUNT(*) as cnt
FROM HS_IHE_ATNA_Repository.Aggregation
WHERE EventType = 'LOGIN'
AND LocalDateTime > '2016-02-16 11:00:00'
GROUP BY EventType, InitiatedAt

This gives me data like this:

LOGIN%SYSTEM69918
LOGINOTHER39


However, I need to get the data back as two columns with all but the last concatenated and delimited, more like this

Last comment 17 February 2016
0   0 4
0

answers

929

views

0

rating

What do you do if you want to have the ID field have a meaningful name for your application? 

Sometimes it comes to pass that when you're making a new table that you want to have the unique row identifier (a.k.a. IDKEY) to be a field that has a name that is meaningful for your data.  Moreover, sometimes you want to set this value directly.  Caché fully supports this functionality and it works   Suppose you have a class Test.Kyle.  The data will be stored like so:

^Test.Kyle(IDKEY)=$LB("",Field1,Field2,...,Fieldn)

Any other field can be unique, but the IDKEY is the one that is the subscript for all the data.  There are two ways to create a named IDKEY.

  1. Property KyleID as %Integer [Identity];
  2. Property KyleID as %Integer;

             Index IDKEYIndex on KyleID [IDKEY]

Last comment 3 February 2016
+ 3   0 5
251

views

+ 3

rating

Attached to this post is a PDF document outlining some of the key enhancements included with 2016.2. I will be giving a WebEx session that is open to all tomorrow at 11 AM EST. Once the WebEx is over I will be adding a link to the recording for those who cannot attend.

2016.2 Field Test Launch
Tuesday, February 2, 2016
11:00 am  |  Eastern Standard Time (New York, GMT-05:00)  |  30 mins
 
Meeting number:    747 673 229

Join!

Join by phone
Call-in toll-free number: 1-866-8576852  (US)
Call-in number: 1-636-6925389  (US)

You can look up global numbers by country for those dialing in from outside the US here:

https://www.tcconline.com/listNumbersByCode.action?confCode=5568713526


Conference Code: 556 871 3526

Here is the link to the recording

+ 4   0 6
0

comments

201

views

+ 4

rating

Hi!

Is there any simple way to query data about processed messages in all Ensemble productions?
What I ultimately would like to do is to periodically export that data to another system and run statistics on it.

I've been digging around in the SQL tables view and Ens.MessageHeader seems to contain most of what I'm after.
Using ODBC I could access that table view and query data, but only for one namespace per DSN it seems.

Can Ens.MessageHeader from different namespaces be mapped into a single namespace so that it can be accessed with ODBC?
Or is there a better way to access this data than to use the ODBC interface?


Thanks
Andreas
 

Last comment 31 January 2016
0   0 5
0

answers

266

views

0

rating

The object and relational data models of the Caché database support three types of indexes, which are standard, bitmap, and bitslice. In addition to these three native types, developers can declare their own custom types of indexes and use them in any classes since version 2013.1. For example, iFind text indexes use that mechanism.

Last comment 29 January 2016
+ 10   0 8
1163

views

+ 10

rating

New to CSP and Zen.  I've been going through tutorials and have made some progress.  Using the "Contacts" tutorial as an example, I'm trying to create a "ViewContact" page.  I want this to be linkable so I'm using URI Parameters, which I understand.  However, what I'm not sure about is how to retrieve a specific record.  Should I use a SQL statement?  If so, how?

Let's say I just wanted to display the property "Name" for the contact with ID 12.  What would be the best way to do so?

Last comment 14 January 2016
0   0 4
0

answers

131

views

0

rating