Results 1 to 9 of 9

Thread: Filtering on recordsets

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2001
    Posts
    38

    Filtering on recordsets

    my question is
    that is it better to open a recorset with select * from table name
    and then filter it based on our requirements
    or
    open the recordset each time with the required condition.

    any ideas or thoughts on this

  2. #2
    Addicted Member E-Link's Avatar
    Join Date
    Nov 2001
    Location
    INA
    Posts
    242
    use where clause
    Code:
    select * from table where field1 = condition

  3. #3
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Arrow hi

    I agree with E-Link because:

    If u open a recordset without a where clause then the entire table is open thus increasing load.

    Secondly, the filter method takes quite some time.

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2001
    Posts
    38

    hai

    i just wanted to hear this

    filter takes time.
    but how do u know this.
    please tell me.
    i really want to know y and how.



    and if we use a contional select statement
    and recive 1 or 2 records as per the condition and suppose u issue this command quite often , then does it not reduce ur performance.
    bcoz i read that toooo many trips to the server is also not good.

    anyway thanks a lot for replying.

  5. #5
    Addicted Member flavorjatin's Avatar
    Join Date
    Sep 2001
    Location
    India
    Posts
    154
    hi,

    i think it other way around and it may also depend on the data in yr table. i think select * during form loading and then using filter option is quite better method.

    bye.
    Best Regards.

  6. #6
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    well

    Note When you know the data you want to select, it's usually more efficient to open a Recordset with an SQL statement. This example shows how you can create just one Recordset and obtain records from a particular country.
    ......MSDN.

  7. #7
    Addicted Member flavorjatin's Avatar
    Join Date
    Sep 2001
    Location
    India
    Posts
    154

    When you know the data you want to select, it's usually more efficient to open a Recordset with an SQL statement.

    Say if i'm searching on access database table with more than 1 lakh records. everytime i specify criteria and click on search, i know which data to select but making recordset on every search from table containing such large data is not feasible i guess. instead using filter is good enough. i've tried both in the same situation explained above with filter giving better results.

    thanks.
    Last edited by flavorjatin; Dec 1st, 2001 at 07:07 AM.
    Best Regards.

  8. #8
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    No offence intended.


    if i'm searching on access database table with more than 1 lakh records. everytime i specify criteria and click on search
    Do you mean that even if you dont need the search then to u load the entire table containing more than 1 lakh records?????

  9. #9
    Addicted Member flavorjatin's Avatar
    Join Date
    Sep 2001
    Location
    India
    Posts
    154
    if in a particular application i click on search option from the menu, this certainly means that i'm gonna search something. don't yu think so.

    and on this search form i intended to open recordset coz during loading of forms users are more patient enough.

    thanks.
    Best Regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width