Unique Difference between Setrange and Setfilter

guptavarunmcaguptavarunmca Member Posts: 95
What is the Unique Difference between Setrange and Setfilter.
With Best Regards:
VARUN K. GUPTA

Comments

  • vijay_gvijay_g Member Posts: 884
    you place no. of difference here as you know.
  • AndwianAndwian Member Posts: 627
    SETRANGE is more simple if you want to filter one field by the value of the other FIELD.

    SETFILTER if you want to filter by any STRING.
    Regards,
    Andwian
  • vijay_gvijay_g Member Posts: 884
    what about performance?
    i think setfilter should be fast rather than setrange.
  • ShedmanShedman Member Posts: 194
    vijay_g wrote:
    what about performance?
    i think setfilter should be fast rather than setrange.
    That of course all depends on which key you are using.
  • vijay_gvijay_g Member Posts: 884
    Shedman wrote:
    That of course all depends on which key you are using.

    i was talking about, after setcurrentkey if you are using setrange or setfilter then which will be fast?
  • SogSog Member Posts: 1,023
    milliseconds or less of difference
    because the setrange only has 2 options for the where clause in the sql versus the setfilter which has more.
    So the time it takes to parce the string in the setfilter - the time it takes to define which of the 2 options it is for the setrange is the difference. There is no difference in the SQL statement sent to the db
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • krikikriki Member, Moderator Posts: 9,110
    On the native server, it could happen that a SETRANGE was faster than SETFILTER.

    But it is good practice to always use SETRANGE if you can and SETFILTER ONLY if you have no other option.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.