The key can be arbitrarily complex, but must be a ground term.
The complexity of this operation is linear in the size of the key, since the key needs to be compared. For indexing purposes, a hash value is computed from the key, and the full depth of the key is taken into account.
Note: If StoreHandle is not a handle, then it must be an atom or a compound term, and the store is identified by this term's toplevel functor together with the context module.
    ?- store_create(Handle),
       store_set(Handle, tom, 12345),
       stored_keys_and_values(Handle, Before),
       store_delete(Handle, tom),
       stored_keys_and_values(Handle, After).
    Handle = $&(store,"17h3")
    Before = [tom - 12345]
    After = []
    Yes (0.00s cpu)
    ?- store_create(Handle),
       store_set(Handle, tom, 12345),
       store_delete(Handle, tom),
       store_delete(Handle, tom).
    Yes (0.00s cpu)