Results 1 to 4 of 4

Thread: Slowly query

  1. #1
    Join Date
    Aug 2010
    Posts
    2

    Unanswered: Slowly query

    Hello guys!

    I have a table that contains 1157510 rows. When run a simple query i have to wait 1m and 8 sec to return 5 rows.

    "select column1
    from tableName
    where
    columnDate Between 'date1' and 'date1+15min'"

    But then you have some special points.
    1- I don't have an id field.
    2- I don't have permision to create any index, or alter any thing in the table structure

    Somebody have an idea to resolve this problem only with a query?

    Thank you!

  2. #2
    Join Date
    Aug 2010
    Posts
    19
    can you please send the indicies on this table.

  3. #3
    Join Date
    Aug 2010
    Posts
    2
    In this tables don't have any indexes or any constraints.

  4. #4
    Join Date
    Aug 2010
    Posts
    19
    well, then there is no other way than to do an FTS (Full table scan), which takes the time it takes, sorry.

    Even when it returns 5 rows, it has to check in each and every page if each row is qualified for the select statement => Full table Scan.

    BTW: having a heap is not always the best solution, consider to change the design of the table, if its to slow for your requirements.

Posting Permissions

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