SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Graph Tables - Thoughts?


Graph Tables - Thoughts?

Author
Message
Thom A
Thom A
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86766 Visits: 22262
Just wondered how much anyone has played with the new Graph Tables (Graph processing with SQL Server 2017).

I'm having a very quick play at the moment to see how it compares and it does makes me wonder why MS think they will compete with a normal Composite key table for many to many relationships. My knowledge of other RDMS's isn't great but are Graph tables something that already exists in Oracle (or other)?

The syntax is a little odd to my brain with the MATCH statement, but if it comes into common use I imagine I can get used to it.

So far, in my experiments, one thing I have noticed is that a clustered index isn't generated on the EDGE tables and I'm not sure how to (as you may not declare any columns). Cost wise, compared to a composite key table, this meant that the Graph Table query was higher. A Table Scan had to be performed on the EDGE table (NODE tables had Clustered Keys), while a Clustered Index Scan could be performed when using the "normal" tables. With a small amount of data, this was a minimal difference, but with much larger datasets, I can see it quickly slowing down.

How have others got along with them so far?

Edit: Ok, so Clustered Indexes look like they work well if created on the $from_id and $to_id columns.


Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does :-P

Please always remember to encapsulate your code in IFCode Markup. For example [code=sql] [/code].
Click here to read Jeffs Guide on how to post SQL questions, and get swift and helpful answers from the community
jonathan.crawford
jonathan.crawford
SSCertifiable
SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)

Group: General Forum Members
Points: 5166 Visits: 1461
Thom, I'm not sure I'm totally following you, and you are just now clueing me into graphs, but can you show me how you're comparing the graph syntax to the composite key syntax? Perhaps using the MS "friends" example? https://docs.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-overview

-------------------------------------------------------------------------------------------------------------------------------------
Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses
Henrico Bekker
Henrico Bekker
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25678 Visits: 6050
Played around with it, can honestly not say I see an immediate use for it in my own life, but considering other similar products are doing this, it just makes sense that MSFT introduces it into their product catalog.
Look at https://neo4j.com/product/ - they have it pretty much dialed in already.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
Thom A
Thom A
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86766 Visits: 22262
jonathan.crawford - Wednesday, May 24, 2017 1:42 PM
Thom, I'm not sure I'm totally following you, and you are just now clueing me into graphs, but can you show me how you're comparing the graph syntax to the composite key syntax? Perhaps using the MS "friends" example? https://docs.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-overview


I'm planning to do an article at some point, once work gets a little quieter as I've had a sudden influx, so hopefully then Smile


Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does :-P

Please always remember to encapsulate your code in IFCode Markup. For example [code=sql] [/code].
Click here to read Jeffs Guide on how to post SQL questions, and get swift and helpful answers from the community
Jason A. Long
Jason A. Long
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20525 Visits: 8223
Itzik touches on the topic in this article... http://sqlmag.com/software-development/puzzle-challenge-graph-matching-t-sql-part-1-concepts
Jo Pattyn
Jo Pattyn
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28620 Visits: 10956
Check the pro's and con's of 2017 implementation ( around july 2017)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search