Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  IDS 11.70FC4 Timeseries Bug

    Posted 5 hours ago

    I know it's old but it's all I have.

    I have no idea if the bug still exists but it may save someone time - it cost me quite a lot of time yesterday ;-)

    Given a table 'tab' with timeseries with a key of 'key' with a rowtype of just an integer, and a corresponding virtual table v_tab

    select first 1 timestamp,reading from v_tab where key = '2d3af6ef74c5e02323e6e0f69552afb3' order by timestamp desc;
    this returns 2026-02-06 00:00:00.00000     2259166
    Now
    select GetClosestElem(ts,'2027-02-11 00:00:00'::datetime year to second,"<").reading,GetClosestElem(ts,'2027-02-11 00:00:00'::datetime year to second,"<").timestamp from tab  where key='2d3af6ef74c5e02323e6e0f69552afb3' ;
    This, correctly returns 2259166 2026-02-06 00:00:00.00000

    select GetClosestElem(ts,'2027-02-11 00:00:00'::datetime year to second,"<=").reading,GetClosestElem(ts,'2027-02-11 00:00:00'::datetime year to second,"<=").timestamp from tab where key='2d3af6ef74c5e02323e6e0f69552afb3';

    This returns 2259166 2027-02-11 00:00:00.00000 ie the requested time is ALWAYS retuned if the comparison is '<='  for the timestamp - the value seems to be correct



    ------------------------------
    Clive Eisen
    ------------------------------


  • 2.  RE: IDS 11.70FC4 Timeseries Bug

    Posted an hour ago
    I assume there is no record at  2027-02-11 00:00:00 ?

    Cheers
    Paul



    On 2/13/2026 4:15 AM, Clive Eisen via IBM TechXchange Community wrote:
    0100019c567f9bae-ffbdf36a-67a7-4818-8acc-f0159451bd7f-000000@email.amazonses.com">
    I know it's old but it's all I have. I have no idea if the bug still exists but it may save someone time - it cost me quite a lot of time... -posted to the "Informix" group





  • 3.  RE: IDS 11.70FC4 Timeseries Bug

    Posted an hour ago

    The first select on the virtual table shows the latest entry - there is nothong later than that

    And if you cahnge the request date you just get that new request date back in the response.



    ------------------------------
    Clive Eisen
    ------------------------------