-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate indexing Nulls #116
Comments
Hi @fppt Since v.2.2 unique indexes also consider null values. You can disable this setting when you create the index setting ignoreNullValues=true, see http://orientdb.com/docs/2.2.x/SQL-Create-Index.html Anyway, I suggest you not to use it, because indexes without null values cannot be used for some query optimizations, so you will lose performance in some corner cases Thanks Luigi |
I just checked that docs page, it contains some outdated info. In v 2.2 null values are NOT ignored by default. Thanks Luigi |
Thanks @luigidellaquila. For the time being is there a way to disable indexing nulls using the available API of this plugin? |
How are you creating the index? Is it a single key index? Thanks Luigi |
I create it as follows:
|
I think this should be enough:
Thanks Luigi |
I added |
@luigidellaquila : Can you expand on your statement to not use "unique, ignored-nulls" indexes because of optimization issues in some edge cases? It's something we're doing quite a bit of (in cases where a property is often the same for 99% of the documents, but we need to quickly find the other 1%). I haven't seen any roblems, but I'd like to understand what to watch out for. |
Hi @Eric24 The query execution planner used to skip index usages in some conditions, when the index was configured to exclude null values. Anyway, in v 3.0 and with the new execution planner we solved this problem, so it's not a concern anymore Thanks Luigi |
Hi Guys,
I create indices the following way:
The problem is that when I create vertices I am not guaranteed to fill every property for every vertex immediately. For example I could create the following:
When I try to commit I get the following error:
If I add the following to the above:
It then works.
Is there a way around this limitation? Currently I just prefill all vertex properties with garbage values but this feels odd.
Thanks guys.
The text was updated successfully, but these errors were encountered: