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-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45628 Visits: 15487
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
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1484 Visits: 466
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
Henrico Bekker
Henrico Bekker
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15695 Visits: 5375
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-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45628 Visits: 15487
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
SSCrazy Eights
SSCrazy Eights (9.3K reputation)SSCrazy Eights (9.3K reputation)SSCrazy Eights (9.3K reputation)SSCrazy Eights (9.3K reputation)SSCrazy Eights (9.3K reputation)SSCrazy Eights (9.3K reputation)SSCrazy Eights (9.3K reputation)SSCrazy Eights (9.3K reputation)

Group: General Forum Members
Points: 9349 Visits: 5847
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
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17265 Visits: 10330
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