Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: speed up sql query

    hi ,

    Does anyone have a tip to speed up sql query?
    My database is too large and everyday thousand rows are being added in databse. For viewing this databse, using sql query takes lot of time. I heard that creating index for table can solve this problem. but i am new to that and don't know how to use it. does any one help me to create index and how can i use in sql query.
    my sql statement is

    "select * from tbldcs where date between to_date('" & Form2.DTP1 & "','dd-mm-yy') and to_date('" & Form2.DTP2 & "','dd-mm-yy') "
    thanks

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: speed up sql query

    Originally posted by gkal
    hi ,

    Does anyone have a tip to speed up sql query?
    My database is too large and everyday thousand rows are being added in databse. For viewing this databse, using sql query takes lot of time. I heard that creating index for table can solve this problem. but i am new to that and don't know how to use it. does any one help me to create index and how can i use in sql query.
    my sql statement is

    "select * from tbldcs where date between to_date('" & Form2.DTP1 & "','dd-mm-yy') and to_date('" & Form2.DTP2 & "','dd-mm-yy') "
    thanks
    1. At first good point is to specify only the names of columns what you want in result of the query.
    2. Try to create index for example:
    create index index_name on table_name parallel;
    This is just an example query for index creating i recommend to you look at documentation for more informations.
    3. Try look at documentation and find "Table partitioning" that also helps bud this is advanced feature so first try to learn something about indexing.

  3. #3
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

Posting Permissions

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