SQL best practice


I have klips running from SQL data and wondered what is faster/best practice : 
  a) to have the query/datasource filter the data by using user input fields to reduce the data that is queried
  b) Have the klip filter all of the data while it is being used

To give an example, I have data for different client sites and have a user input to select the client group and/or site group. Is it better to filter the data to only query the client or site details; or to bring in all the data and let the klip table/chart filter to the correct result.

I'm using option a) as it felt the logical thing to do; however I'm after any suggestions on how to make SQL queries faster and more efficient.

Many thanks

1 comment

  • 0
    Meggan King

    Hi Catherine -

    It is better to limit the data you bring in to just what you want to display - either through the query itself, limit the columns brought back (specific SELECT vs SELECT *), and handle some processing on your end - instead of in the Klip. 


    Hope this helps!


Please sign in to leave a comment.