Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    2

    Unanswered: Prob. Query by Date Range or Date in Sybase

    Hi,
    I've got a really large table (several gigs) that I am tryin to query by date. ie - Show me everything for 7/15/2003 (fields = name, date).

    The query times out as the table is too large. From what I understand the date isn't indexed so the system has to do a full table scan to pull the rows.
    How can I do this? I'm VERY new to Sybase, but all help is appreciated.

    Thanks,
    Kevin

  2. #2
    Join Date
    Aug 2002
    Location
    Madrid, Spain
    Posts
    97

    Re: Prob. Query by Date Range or Date in Sybase

    Originally posted by doaz
    I've got a really large table (several gigs) that I am tryin to query by date. ie - Show me everything for 7/15/2003 (fields = name, date).

    The query times out as the table is too large. From what I understand the date isn't indexed so the system has to do a full table scan to pull the rows.
    How can I do this? I'm VERY new to Sybase, but all help is appreciated.
    Let's start from the basis that a table scan must
    be performed if the select criteria don't include
    any column from any index. Now, your shop must
    decide whether those queries by date deserve
    creating a new index. Since the table is huge,
    creating a new index will take a lot of time and
    space. Also, if the table receives thousands of
    inserts (I presume this is the reason why it is
    so big) the performance penalty of having one
    index more may be noticeable, since inserts are
    cheaper as the table has less indexes.

    Regards,
    Mariano Corral

  3. #3
    Join Date
    Aug 2003
    Posts
    2
    YEP... you HIT the nail on the head.

    That is exactly the situation here.

    doaz

  4. #4
    Join Date
    Mar 2003
    Location
    Vienna
    Posts
    24

    Please more details

    Hi doaz,

    it would be nice to have more deatails about your system and they way data gets in. As much/detailed as possible please.

    plus

    Is there any possibility to migrate to other systems. You run Financial report out of it? Does a DWH implementation make any sense?

    SL
    Last edited by clarus; 08-01-03 at 23:10.
    kdb is the solution of all problems.
    Just try it, www.kx.com

Posting Permissions

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