Tag Archives: performance

Faux Bitmap Indexes in Neo4j Part Two

Last time we introduced the problem of single model, multiple property search queries taking a bit of time in Neo4j. We saw that using composite indexes or using “additional” labels can help us in some situations but not all. I promised you a stored procedure to build fake bitmap indexes could help, so today we’re going to see how to build one.
Continue reading

Tagged , , , , , , , , ,

Faux Bitmap Indexes in Neo4j

If you’ve ever watched my talks about Neo4j, I tend to say we’re not very well optimized for Single Model queries where relationships aren’t considered. In fact, we’re kinda bad at it. Things got better when Composite Indexes were introduced, but we still have some limitations to deal with. Today we’re going to explore the issues and build our own faux “bitmap indexes” to get around this problem.
Continue reading

Tagged , , , , , , , , , , ,

Declarative Query Languages are the Iraq War of Computer Science

It’s Memorial Day weekend in the United States. Some people are staying home, others are observing the holiday quietly and others still are using it as an excuse to party because they have seemed to have forgotten that the entire world is once again at war. At war with a tiny enemy, so small some people think it’s a hoax. The worst part is the enemy is in each other, our friends and neighbors. But Memorial day is not about remembering the wars, but rather remembering the fallen. To remember those who gave all. Whatever you may think of war, all are terrible, some were necessary. I never served, so that’s about all I get to say about that.

About 14 years ago Ted Neward wrote a very long blog post on “The Vietnam of Computer Science”. There is a follow up, and a short summary by Jeff Atwood as well. If you have never read them, I ask you to do so now…and with that, I believe Query Languages are the Iraq War of Computer Science.

Continue reading

Tagged , , , , , , , , ,

Cleansing your Neo4j Aura

Last week I was helping out a user who was seeing lots of error messages in their application logs when connecting to Neo4j Aura. So I did like any good developer and I asked the all knowing all powerful google how to cleanse your Aura, and guess what it told me…

Continue reading

Tagged , , , , , , , ,

Composite Indexes in Neo4j 4.0

Neo4j 4.0 has officially launched and folks are very excited about some of the new features including multiple graphs and schema based security. But you should also be excited about some of the more “quality of life” improvements in the product. One we will talk about today is the upgrade that composite indexes received.

Continue reading

Tagged , , , , , , , ,

Going Faster in 2020

Everybody loves benchmarks. Well let me rephrase that, everyone who publishes benchmarks loves the benchmark they publish. Nobody publishes benchmarks that make them look bad, it would be a terrible idea. But you my friend are in luck. I’m full of terrible ideas and today I’m going to publish some benchmarks that makes us look bad. Why? Because we are actively trying to improve this part of Neo4j and I want to experiment with some ideas and see what a ballpark theoretical limit should look like…and I’ll throw in some “inside baseball” about the graph database space from my point of view if you stick around until the end.
Continue reading

Tagged , , , , , , , ,

Getting the latest transactions

On Neo4j’s User Slack someone was having a bit of a hard time getting a query to return quickly. Their model had User Nodes and Transaction Nodes, and they wanted to get the last 25 transactions for a user. This particular user had millions of transactions and the query was taking forever. I’m going to show you how we can speed up the query and hopefully teach you a new modeling trick you can use in your graphs.

Continue reading

Tagged , , , , ,

Visualizing Activities

A few weeks ago I blogged about Activities in Neo4j, and we ended up with a way to recommend an activity to a user based on what sequence of activities they had done in the past. We also had a list of common sequences of activities, but they were a bit hard to digest. Today I’m going to show you how to visualize them so they make more sense.

Continue reading

Tagged , , , , , , , ,

Finding Fraud

It’s no secret that one of our hottest use cases lately has been Fraud Detection. A while back we did a webinar talking about some of the ways you could use Neo4j to fight fraud. Watch it, if you haven’t yet. Today I want to augment that webinar with some cypher queries. Let’s see how it works:
Continue reading

Tagged , , , , , , , , , , , ,

Parallel K-Hop Counts

As a foreigner I was a little perplexed the first time I went to IHOP. You are served a stack of pancakes 3-5 high. How do you eat them? Do you pour syrup over the top and cut down through all the layers and eat them that way… or do you unstack them, pour syrup over each one and eat one at a time? If you are American, you eat them stacked. If you see someone eat them one at a time, you know they are shape-shifting lizard people. But doesn’t that mean the bottom layers are dry and don’t get any butter or syrup on them? Well you would think, but Americans are an ingenious people and they found a way to fix that problem. More syrup, more and more, and then a bit more to be sure… and a side of bacon. Now that you know all about IHOP, let’s switch gears to KHOP. Let’s say you wanted to find out how many nodes there were k-hops away from a starting node. What would be the best way to do that?

Continue reading

Tagged , , , , , , , , ,