by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Sacha Froment
    @sfroment
    127.0.0.1:6379> GRAPH.QUERY test2 "CREATE INDEX ON :user(userID)"
    1) 1) "Indices created: 1"
       2) "Query internal execution time: 95467.775098 milliseconds"
    (95.47s)
    127.0.0.1:6379>  GRAPH.EXPLAIN test2 "MATCH (from_post:post)<-[from_view:view]-(u:user) WHERE from_post.postID = 'domain:1765043741' AND u.userID <> 'domain:32122905' RETURN u.userID, count(from_view) ORDER BY count(from_view) DESC  LIMIT 1"
    1) "Results"
    2) "    Limit"
    3) "        Sort"
    4) "            Aggregate"
    5) "                Filter"
    6) "                    Conditional Traverse | (u:user)-[from_view:view]->(from_post:post)"
    7) "                        Filter"
    8) "                            Node By Label Scan | (u:user)" <------ shouldn't it be Index Scan ?
    DvirDukhan
    @DvirDukhan
    not in this case.
    indices are valid for exact match or comparison such as gt, ge lt, le. They do not support negation or exclusion
    Sacha Froment
    @sfroment
    So this kind of query
    127.0.0.1:6379>  GRAPH.QUERY test2 "MATCH (from_post:post)<-[from_view:view]-(u:user) WHERE from_post.postID = 'domain:1765043741' AND u.userID <> 'domain:32122905' RETURN u LIMIT 1"
    1) 1) "u"
    2) 1) 1) 1) 1) "id"
                2) (integer) 4172307
             2) 1) "labels"
                2) 1) "user"
             3) 1) "properties"
                2) 1) 1) "userID"
                      2) "domain:35276567"
    3) 1) "Query internal execution time: 14279.878097 milliseconds"
    (14.28s)
    will always be slow ?
    I don't understand why isn't it just match one user that the user is != domain:32122905
    DvirDukhan
    @DvirDukhan
    this query requests all the users which are not domain:32122905
    Sacha Froment
    @sfroment
    is there a way to tell to query only 1 user that isn't domain:32122905
    DvirDukhan
    @DvirDukhan
    you can first match the user, do WITH users LIMIT 1 and than do the pattern matching
    somthing like "MATCH (u:user) where u.userID <> 'domain:1234' WITH u LIMIT 1 match your pattern and return results"
    Sacha Froment
    @sfroment
    This assume that my user have a relation with my post
    If the user selected isn't one with a relation with the post I'll get an empty array as a result I've try to trick this way
    DvirDukhan
    @DvirDukhan
    you wanted a single user no?
    Sacha Froment
    @sfroment
    Yes
    127.0.0.1:6379> GRAPH.QUERY test2 "MATCH (u:user) WHERE u.userID <> 'domain:32122905' WITH u AS u LIMIT 1 MATCH (u)-[from_view:view]->(from_post:post) WHERE from_post.postID = 'domain:1765043741' RETURN u LIMIT 1"
    This query return an empty result
    DvirDukhan
    @DvirDukhan
    maybe try only the pattern matching, without client constaint, do a WITH and than filter the user
    Sacha Froment
    @sfroment
    Will try it !
    thx
    Sacha Froment
    @sfroment

    Nop same result
    I think it might be link with this

    127.0.0.1:6379> GRAPH.QUERY test2 "MATCH (u:user)-[from_view:view]->(from_post:post) WHERE  from_post.postID = 'domain:1765043741' RETURN u LIMIT 1"
    1) 1) "u"
    2) 1) 1) 1) 1) "id"
                2) (integer) 4172307
             2) 1) "labels"
                2) 1) "user"
             3) 1) "properties"
                2) 1) 1) "userID"
                      2) "domain:35276567"
    3) 1) "Query internal execution time: 91.181432 milliseconds"
    127.0.0.1:6379> GRAPH.QUERY test2 "MATCH (u:user)-[from_view:view]->(from_post:post) WHERE  from_post.postID = 'domain:1765043741' RETURN u LIMIT 2"
    1) 1) "u"
    2) 1) 1) 1) 1) "id"
                2) (integer) 4172307
             2) 1) "labels"
                2) 1) "user"
             3) 1) "properties"
                2) 1) 1) "userID"
                      2) "domain:35276567"
       2) 1) 1) 1) "id"
                2) (integer) 4288396
             2) 1) "labels"
                2) 1) "user"
             3) 1) "properties"
                2) 1) 1) "userID"
                      2) "domain:16922125"
    3) 1) "Query internal execution time: 11475.309247 milliseconds"
    (11.48s)

    Finally I don't think this problem was linked with my indexing problem I'll fill an issue on github

    DvirDukhan
    @DvirDukhan
    this is a different query, you asked before for <> now you want =
    Sacha Froment
    @sfroment
    Yes this one is different
    DvirDukhan
    @DvirDukhan
    if it is indexed, do the = first
    Sacha Froment
    @sfroment
    I've tested GRAPH.QUERY test2 "MATCH (u:user)-[from_view:view]->(from_post:post) WHERE from_post.postID = 'domain:1765043741' WITH u as u, from_post AS fa LIMIT 10 MATCH (u) RETURN u LIMIT 1"
    DvirDukhan
    @DvirDukhan
    is the postID indexed?
    Sacha Froment
    @sfroment
    Yes
    also
    user as userID
    post as postID
    RomainSY
    @RomainSY
    Hello, I am new to RedisGraph and I am experimenting some difficulties. I obtain data from a stream one record at a time. Each record contains 33 data and I want to create 33 nodes, one for each data, all linked to a node representing the record. I managed to split the record into the 33 data that I store into an array and I created the node for the record. Then for each element of the array I create a node and link it to the record. This method works but it is very slow (~0.5s to create the 34 nodes and 33 links). I've read that RedisGraph runs very fast and can create a million nodes in less than a second so obviously my method is incorrect. Is there a way to create all of what I need whitout this for loop which multiply the number of queries ?
    Sacha Froment
    @sfroment
    Yup you should use https://github.com/RedisGraph/redisgraph-bulk-loader if you want fast loading
    You'll be able to input 1m node in a blink of an eye
    RomainSY
    @RomainSY
    Thank you, I've already investigated the GRAPH.BULK. Can it be used with my array ?
    Sacha Froment
    @sfroment
    Yup, you'll need to generate the csv files needed in your case it will 2 node file. 1 file for your "record" node, 1 file for your other 33 node, and 1 file with the relation, that link your 33 node to the "record" node
    RomainSY
    @RomainSY
    But I can't use it directly, I need to create CSV files each time ?
    Sacha Froment
    @sfroment
    Yup, there's no other way at the moment, you can always implement it in your own code, that's what I've done in order to get better integration with my code
    RomainSY
    @RomainSY
    Ok, thank you very much for your help
    Sacha Froment
    @sfroment
    Is there some easy issue to be done to get started understanding the source code ?
    DvirDukhan
    @DvirDukhan
    @RomainSY can you share your queries? Or anonymous versions of them so we can understand better your flow?
    Sacha Froment
    @sfroment
    Is there any ttl mechanism to delete node/edge ?
    DvirDukhan
    @DvirDukhan
    We currently not having this feature
    Sacha Froment
    @sfroment
    Thx !
    Sacha Froment
    @sfroment
    When I do a bulk insert if I want to make a mutual relation between 2 node
    (a)<-[]->(b)
    Am I forced to send 2 relation <id-node-src><id-node-dst><relation><id-node-dst><id-node-src><relation> ?
    Sacha Froment
    @sfroment
    Hello, I've decided to split my graph into smaller graph to speed up the input process, my graph is now splitted into 60 chunck, I upload them using graph.bulk each running bulk as his client, using client list I can see that redis is putting my client. in a idle state. Since the graph isn't the same shouldn't my client be running there bulk independently ?
    Sacha Froment
    @sfroment
    Could you explain me this new limit graph meta key plz VKEY_MAX_ENTITY_COUNT_DEFAULT?
    DvirDukhan
    @DvirDukhan
    Number of entities encoded in each chunk of graph, in graph sterilization
    Sacha Froment
    @sfroment
    thx !
    ooxaam
    @ooxaam
    Hi geeks, I'm new to redis and docker. I have started learning redis and want to use redisInsight with it. But I'm unable to start redisInsight via docker. so I'll really appreciate if someone can help me in using redisInsight.
    For more details:
    https://stackoverflow.com/questions/62161864/redisinsight-docker-displaying-site-cannot-be-reached-in-browser