Average cycles of data

Hi, there,
My problem is as follows:
I have a PCI DAQ card. I need to read two set of sychornized values. One set is a periodic waveform data (wave 1, say triangular waveform) the other set (wave2) is actually the signal in response to the triangular waveform from my hardware.
Since the data is periodic, I want to average the data captured in different cycles so that the noise will be greatly reduced.
The user can specify how many cycles of the waveform are required in the user-interface.
My question is
In order to average the cycle I need to find a way to differentiate individual cycle 1st. So in this case of a triangular wave, may I know what is the best way to extract each individual waveform cycle (wave1)and the corresponding data points in wave2?
Rgds,
Jacob

Jacob,
Thank you for posting to the NI forums.  There are several ways you could approach this problem.  One pretty straightforward way would be to use software techniques to split up the waveform into periods.  For example you could use the Extract Single Tone Information.vi to determine the period of each cycle.  Then using this period information you could use the Get Waveform Subset.vi to extract single cycles from the waveform.  Let me know if you have any questions about using this approach.
Regards,
Neil S.
Applications Engineer
National Instruments

Similar Messages

  • Calculate average for some dates

    Hi,
    I would like to calculate average for some dates. Is there any function module or any process, please provide me.
    venkat.

    Use this FM HR_HK_DIFF_BT_2_DATES
    Example:
    DATA: DATE1 type P0001-BEGDA,
              DATE2 type P0001-BEGDA,
    YEARS type P0347-SCRYY,
    MONTHS type P0347-SCRMM,
    DAYS type P0347-SCRDD.
    DATE1 = '20070331'.
    DATE2= '20070101'.
    CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
    EXPORTING
    DATE1 = date1
    DATE2 = date2
    OUTPUT_FORMAT = '03'
    IMPORTING
    YEARS = years
    MONTHS = months
    DAYS = days
    EXCEPTIONS
    INVALID_DATES_SPECIFIED = 1
    OTHERS = 2
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Joan

  • SUM(Case how to use this structure to get average values over date range

    I am using:
    Oracle SQL Developer (3.0.04) Build MAin-04.34 Oracle Database 11g Enterprise Edition 11.2.0.1.0 - 64bit Production
    How do I use the sum function with a case structure inside.
    so I have data that looks like has an ID, date, and value. I am looking to get the 7 day average for the date range of 4/1/2013 thru 4/20/2013
    with t as (
    select 1 ID_Key,to_date('4/1/2013','mm-dd-yyyy') date_val, 10 Value_num from dual union all
    select 1 ID_key,to_date('4/2/2013','mm-dd-yyyy'), 15 from dual union all
    select 1 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 20 from dual union all
    select 1 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 0 from dual union all
    select 1 ID_key,to_date('4/8/2013','mm-dd-yyyy'), 12 from dual union all
    select 1 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 8 from dual union all
    select 1 ID_key,to_date('4/10/2013','mm-dd-yyyy'), 6 from dual union all
    select 1 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 10 from dual union all
    select 1 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all
    select 1 ID_key,to_date('4/14/2013','mm-dd-yyyy'), 0 from dual union all
    select 1 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 10 from dual union all
    select 1 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 5 from dual union all
    select 1 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 2 from dual union all
    select 1 ID_key,to_date('4/20/2013','mm-dd-yyyy'), 3 from dual union all
    select 2 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 12 from dual union all
    select 2 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 15 from dual union all
    select 2 ID_key,to_date('4/6/2013','mm-dd-yyyy'), 5 from dual union all
    select 2 ID_key,to_date('4/7/2013','mm-dd-yyyy'), 7 from dual union all
    select 2 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 10 from dual union all
    select 2 ID_key,to_date('4/11/2013','mm-dd-yyyy'), 5 from dual union all
    select 2 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 0 from dual union all
    select 2 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all
    select 2 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 6 from dual union all
    select 2 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 8 from dual union all
    select 2 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 0 from dual union all
    select 2 ID_key,to_date('4/18/2013','mm-dd-yyyy'), 10 from dual union all
    select 2 ID_key,to_date('4/19/2013','mm-dd-yyyy'), 5 from dual
    )**Please let me know if the table does not load.
    I would like to get the 7 day average as long as there is date for that row has enough previous dates, it not then it will return null.
    the results should look like this
    ID_Key      date_val     Value_num     7Day_Avg     7Day_Avg2
    1     4/1/2013     10          null          null
    1     4/2/2013     15          null          null
    1     4/3/2013     20          null          null
    1     4/5/2013     0          null          null
    1     4/8/2013     12          6.71          11.75
    1     4/9/2013     8          5.71          10.00
    1     4/10/2013     6          3.71          6.50
    1     4/12/2013     10          5.14          9.00
    1     4/13/2013     0          5.14          7.20
    1     4/14/2013     0          5.14          6.00
    1     4/15/2013     10          4.86          5.67
    1     4/16/2013     5          4.42          5.17
    1     4/17/2013     2          3.85          4.50
    1     4/20/2013     3          2.86          4.00
    2     4/3/2013     12          null          null
    2     4/5/2013     15          null          null
    2     4/6/2013     5          null          null
    2     4/7/2013     7          5.57          9.75
    2     4/9/2013     10          7.00          9.80
    2     4/11/2013     5          6.00          8.40
    2     4/12/2013     0          3.86          5.40
    2     4/13/2013     0          3.14          4.40
    2     4/15/2013     6          3.00          4.20
    2     4/16/2013     8          2.71          3.80
    2     4/17/2013     0          2.71          3.17
    2     4/18/2013     10          3.43          4.00
    2     4/19/2013     5          4.14          4.83As you may notice, there are gaps in the dates, so the value are then treated as zeros for the 7Day_Avg and then ignored for teh 7Day_Avg2 (not counted as number of days averaged do to no valu_num row)
    I was trying something like this to start, but getting error "missing keyword"
    select
    t.*/,
    sum(
          case
            when date_val between :day2 - 6 and :day2
            then value_num between date_val - 6 and date_val
            else null
            end
            as 7Day_avg
    form tShould I have the case structure outside the sum function?
    Any thoughts??
    Edited by: 1004407 on Jun 7, 2013 11:06 AM

    Hi,
    If you want the average of the last 7 days, including the current day, then then RANGE should be 6 PRECEDING, not 7.
    Try this:
    WITH     got_min_date_val AS
            SELECT  id_key, date_val, value_num
            ,       MIN (date_val) OVER () AS min_date_val
            FROM    t
            WHERE  date_val BETWEEN TO_DATE ('04-01-2013', 'mm-dd-yyyy')
                             AND   TO_DATE ('04-20-2013', 'mm-dd-yyyy')
    SELECT    id_key, date_val, value_num
    ,         CASE
                  WHEN  date_val >= min_date_val + 6
                  THEN  SUM (value_num) OVER ( PARTITION BY  id_key
                                               ORDER BY      date_val
                                               RANGE         6 PRECEDING
                        / 7
              END  AS avg_7_day
    ,         CASE
                  WHEN  date_val >= min_date_val + 6
                  THEN  AVG (value_num) OVER ( PARTITION BY  id_key
                                               ORDER BY      date_val
                                               RANGE         6 PRECEDING
              END   AS avg_7_day_2
    FROM      got_min_date_val
    ORDER BY  id_key
    ,         date_val
    Output:
       ID_KEY DATE_VAL   VALUE_NUM  AVG_7_DAY  AVG_7_DAY_2
             1 01-APR-13         10
             1 02-APR-13         15
             1 03-APR-13         20
             1 05-APR-13          0
             1 08-APR-13         12       6.71        11.75
             1 09-APR-13          8       5.71        10.00
             1 10-APR-13          6       3.71         6.50
             1 12-APR-13         10       5.14         9.00
             1 13-APR-13          0       5.14         7.20
             1 14-APR-13          0       5.14         6.00
             1 15-APR-13         10       4.86         5.67
             1 16-APR-13          5       4.43         5.17
             1 17-APR-13          2       3.86         4.50
             1 20-APR-13          3       2.86         4.00
             2 03-APR-13         12
             2 05-APR-13         15
             2 06-APR-13          5
             2 07-APR-13          7       5.57         9.75
             2 09-APR-13         10       7.00         9.80
             2 11-APR-13          5       6.00         8.40
             2 12-APR-13          0       3.86         5.40
             2 13-APR-13          0       3.14         4.40
             2 15-APR-13          6       3.00         4.20
             2 16-APR-13          8       2.71         3.80
             2 17-APR-13          0       2.71         3.17
             2 18-APR-13         10       3.43         4.00
             2 19-APR-13          5       4.14         4.83
    Message was edited by: FrankKulash
    Sorry; I meant to reply to OP, not to Greg

  • 2011 13" Air average cycles on battery after 1 year?

    Just bought a used 2011 "13 for a super deal and the battery cycles say 495. Does this sound a bit high? Health is 89%. I haven't done a recalibration after doing a fresh install and pram and SMC reset. What are yours saying after a year of use?

    Yea seems like it from my research on average cycles. Nothing bad though it is showing 6:30 hours after a 100% charge and lasts about that long. I got it for $700 and it is in perfect cosmetic and mechanical condition. So even with battery replacement factored in its not that much. How long does yours last after a years worth of use with light duty use?

  • What's the average cycle count and lifespan of a PB G4 battery?

    I've had my computer 15" Powerbook for about 22 months. Cycle count =367. My AppleCare warranty ends in about 14 more months. What's the average cycle count before the battery dies?
    By the way, I use my computer everyday. This thing better than any other macbook pro out there. Thanks.

    First, you should know that Applecare doesn't cover the battery, it is specifically excluded unless it's defective. That's because Apple considers the battery a consumable item. You can read it under limitations at http://images.apple.com/legal/applecare/docs/AppleCareProtect_Plan_NAen.pdf
    Regarding the life, how you maintain the battery has an impact on how many cycles you get out of it. For example, if it's plugged in all the time, your cycle count will be low by the time the battery fails. Apple says that a properly maintained battery should be at 80% capacity after 300 cycles. This is the Apple note on battery maintenance: http://www.apple.com/batteries/notebooks.html

  • How to average live output data from a 4 - 20 mA source?

    Hi,
    I am very new to the world of LabView and I am looking for some help. I am trying to write a code that I can use in the testing of heat pump water heaters. I have gotten my code to a point where I can read in my temperature and flow rates, and calculate the BTU/hr for my heat pumps, but I want to be able to average my BTU/hr so my data isn't as noise. I would really like to be able to have my code take in say 200 samples of data and create a live average that I can display on a graph. I have tried many different kinds of mean.vi's using different loops and arrays, but I haven't come up with anything that works right. Most likely I am an idiot and doing this all wrong anyways, but some help would be greatly. Please see my attached code.
    Attachments:
    Test Stand for Forum.vi ‏197 KB

    I have removed the True from the initialize node on the block. I am still getting the same value for the mean as I am for the live data. I have let the system sample the correct number of times for the sample on the mean as well. Does this have to do with the way I am viewing the output of the mean block or am I doing something else wrong? I am testing this out on a simplied code and getting the same results as well. Could you please take a look at the attached code to see if I have everything wired set up correctly? Thanks so much for all the help so far too!
    Attachments:
    Simple Test Code 1.vi ‏22 KB
    Simple Code 1.JPG ‏22 KB

  • Using average days between dates to predict a launch date on another produc

    I hope someone might be able to help me out here.
    I am at the limit of my Webi expertise! (which is not saying a lot)
    We have a universe containing date information relating to the launch of products thus:
    Product Name
    Supplier Name
    Category
    Sample Availability Date
    Testing Start Date
    Launch Go Date
    It is a simple matter to create a variable u2018Project Timeu2019 as DaysBetween(Testing Start Date;Launch Go Date)
    And using the Average function we can create Average Project Length - Also with the Report, and Section keywords we can show the global average, and averages by Supplier and Category.
    Here is my problem.
    We also have Products in the universe that have yet to have their projects kicked off, so Testing Start Date and Launch Go Date for those products are null data. I want to use the Sample Availability Date and the Average Project Length variable to predict the probable Launch Go date, however, in the report this element shows up as an empty cell.
    Does anyone have an idea how I might achieve this?
    Many Thanks
    Mark

    OK...
    Lets imagine there are records for 100 devices in the universe.  75 of them have valid project start dates and launch dates.  25 of them have neither because those projects are yet to start.  However they do have a sample availability date.
    Using the DaysBetween function I can create a variable called project length from the start and launch dates.  I can then use the Average function to get the average project length (for the devices that actually have a project length)
    Somehow I want to add this average project length to the sample availability date on the records that have yet to have a start date.
    As projects end they will add to the average, and we can see how close they were to the predicted launch. As new records are added they will automatically have a predicted date.
    Right now I have the average project length, If I create a table filtering on completed projects (Projects with a non-null launch date) and I add a column showing average project length, because I've used the In Report keyword on the average, it shows the average value in this table.
    If I have a stand-alone cell with the average project length it shows the right value
    But if I have a table showing the devices yet to start (filtering on Null start date) If I add the average project length into that table it shows as blank (I.e. no value at all)
    Hope this helps

  • Averaging column with date/time format in BI Answer

    Hi everyone
    we are working on BI answer and training to get the average of the working hours of the departments. The Working Hrs column is Date format in the Database so we tried to converted to CHAR through Cast Function from Edit columns Formula in Answers BI, and this gave us date "2007/09/01" as result!! We also tried to cast the Working hours to:
    CAST(WORKING HOURS AS CHARACTER FORMAT 'yyyyMMdd-HHmmss')
    NOTE: In the Working Hours we have null values...
    the actual working hours appear in Answer Table is "7/1/2009 6:13:00 AM"
    How to get the Working Hours column Average on Answer BI?
    Appreciate your help
    Regards
    Edited by: user817525 on Jul 21, 2009 11:15 PM

    how about next solution:
    60 * EXTRACT( HOUR FROM ATTENDANCES.A_ATT_TIME) + EXTRACT( MINUTE FROM ATTENDANCES.A_ATT_TIME)
    with this u have minutes for working day. If u divide this expression with 60:
    (60 * EXTRACT( HOUR FROM ATTENDANCES.A_ATT_TIME) + EXTRACT( MINUTE FROM ATTENDANCES.A_ATT_TIME)) / 60
    u now have hour with decimal (for 8:52 is (8*60+52)/60 = 8,67 )
    and u only need to round this number.I hope this help
    ps.when u have new question probably is good way to create new thread
    all best
    Phenix
    Edited by: Phenix on Aug 5, 2009 8:01 AM

  • Need to average real time data

    I have a sensor that sends 1000 samples per second, The signal is very noisey. I would like a Vi that can read these samples from DAQ6009 and average them out (probably take 10 samples then average, then take next 10 and average and so on). I need to graph the averages and also I need to generate an on/off signal through the DAQ based on the results.

    Hello,
    I would advise starting off with the "Cont Acq&Graph Voltage-Int Clk.vi" example which can be found in the example finder under Hardware Input and Output > DAQmx > Analog Measurements > Voltage. Here you can experiment with acquiring your sensor data and graphing it. Once you are successfully acquiring this in the manner which you desire, you can begin to look at the post processing stage and subsequent output signals.
    Kind Regards,
    Paul
    http://www.paulharris.engineering

  • SNC Kanban Issue - Control Cycle Master Data

    Hi,
    We are testing the SNC Kanban scenario with contracts (PO) between ECC & SNC.
    We have created a control cycle for the ECC material and have sent the Master Data to SNC. We are now trying to send over the control cycle info to SNC and are getting hte following message when we run KANBAN_MD_TRANSMIT:
    "Kanban control cycle 70666: No address data available; processing terminated"
    Any suggestions would be appreciated.
    regards.

    Hi Anjan Bellur
    As per the error message, the address details for your supply area are not maintained
    Kindly go to the transaction PK05 in r/3 system
    For your plant and Production supply area, Shift+F5
    Maintain the address details
    Then the reported error message will not appear
    Best Regards
    Vinod

  • Cycle count dates upload from Legacy.

    Hi,
       In my client there is a requirement to upload the last count date from legacy to sap at the time of cutover. This they want as after inventory load they dont want to start counting everything which A kind of materials. Client is asking, since i have this date, so keep this date in SAP & then calculate the next date in SAP after go live from that date.
    I searched all the places & found that since the field is internal i really cannot populate this. Is there any standard program or some how create one program to upload this date. If yes then plz let me know. If you had used this methodology, then kindly provide me the details.
    Thanks in advance.
    Avas

    Create additional CC indicator with 'No of Physical Inv' as zero and use this one to maintain the materials that already undergone cycle counting before go-live. Also, have the CC indicator as fixed for these materiasl in material master -> Plant data. When you run ABC analysis (MIBC), these CC indicators won't be changed and as they 'No of Physical Inv' as zero, they won't be part of your cycle counting. When you need these materials to be part of cycle count, change the CC indicator as fixed and run MIBC, now system proposes the cc indicator based on consumption/usage.
    Or
    You can keep a block for the materials that already undergone cycle counting before go-live in MBEW-SPERW through transaction MM17 or MASS.
    Please award points if useful.

  • Average betweeen two dates

    Hi All
    I have five different adte fields:
    DateA Date B DateC DateD DateE
    How can i find the average number of days between any two given date fields?
    Thanks All

    Thanks,
    When i tried to implement the solution: trinc(date1)-trunc(date2), i'm getting mismatch invalid datatypes, but both the dates are of the same datatype VARCHAR2-10?
    Any ideas?

  • Cycle count dates

    anyone know the TABLE where we can get the count history ..for example i would like to know the dates or no.of times the the material has been counted in a fiscal yr  .....for ABC cycle count (

    Try table ISEG

  • Average of the dates in a column.

    Hello Oracle Gurus,
    I am having a problem. I have a table with 2 columns. One is the feed arrival time and one is the feed name.I want to find out the average feed arrival time of all the feed.
    To explain it better suppose there are 2 feeds feed 1, feed 2, feed 3 which I receive every day and I have a table with corresponding time_stamp at which the feed arrived. I want to find out the average time of the day at which each feed arrived during a month.
    Is there any possible way to do this?
    Thanks
    Abs

    I think my query works in this case..
    with t
    as
    SELECT TO_CHAR(TO_DATE('2/3/2009 3:12:00 AM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')     FEED_ARRIVAL  , '1FG1'     FEED_CODE   FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/4/2009 3:47:00 AM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1FG1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/5/2009 4:07:00 AM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1FG1'                 FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/6/2009 3:53:00 AM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1FG1'                 FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/7/2009 3:58:00 AM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1FG1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/2/2009 7:39:00 PM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                    , '1TR1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/3/2009 7:39:00 PM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                    , '1TR1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/4/2009 7:41:00 PM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                    , '1TR1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/5/2009 7:43:00 PM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                    , '1TR1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/6/2009 7:43:00 PM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                    , '1TR1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/9/2009 7:42:00 PM' ,'MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                    , '1TR1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/2/2009 10:20:00 PM','MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1DE1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/3/2009 10:58:00 PM','MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1DE1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/4/2009 10:45:00 PM','MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                    , '1DE1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/5/2009 10:46:00 PM','MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1DE1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/6/2009 10:37:00 PM','MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1DE1'              FROM DUAL UNION ALL
    SELECT TO_CHAR(TO_DATE('2/9/2009 10:42:00 PM','MM/DD/YYYY HH:MI:SS AM'),'SSSSS')                                        , '1DE1'              FROM DUAL
    select TO_CHAR(TO_DATE(AVG (DISTINCT FEED_ARRIVAL),'SSSSS'),'HH24:MI:SS'), FEED_CODE
    from t
    GROUP BY FEED_CODE
    order by FEED_CODE
    TO_CHAR( FEED
    22:41:20 1DE1
    03:47:24 1FG1
    19:41:15 1TR1
    3 rows selected.

  • Tuning average of a data set calculation in an increasing Data Set

    I was asked a question by one of my colleagues in another team:
    In a table with increasing number of rows and that too in an increasing order of Id Keys- 1,2, ....3000... 12000 .... 50000..............
    We have a column age.
    And we have a query:
    select avg(age) from <tablename> ; 
    This query is increasingly taking a longer time
    How to optimize it.
    I guessed that we might need some  sort of partitioning or additional grouping but I am not fully sure
    as to that would be the best solution.
    What do you say?

    I was asked a question by one of my colleagues in another team:
    In a table with increasing number of rows and that too in an increasing order of Id Keys- 1,2, ....3000... 12000 .... 50000..............
    We have a column age.
    And we have a query:
    select avg(age) from <tablename> ;
    This query is increasingly taking a longer time
    How to optimize it.
    I guessed that we might need some  sort of partitioning or additional grouping but I am not fully sure
    as to that would be the best solution.
    What do you say?
    I say it sounds like an interview question to me!
    A question like that is often ask to see how (or if) a person thinks before answering.
    Will they just blindly try to privide an answer?
    Are they willing to ask questions to clarify the question being ask?
    Will they ask questions to try to understand the actual requirements?
    1. No one stores AGE in a database. Someone's age changes everyday so 'age' is a total meaningles piece of data. A data element like 'age at death' is meaninful and does NOT change. It can be meaningful because it protects potentially sensitive information like birth date and death date.
    2. Neither the questioner nor you have presented ANY INFO indicating that any query needs to be optimized. Of course a query on an increasing amount of data will take an 'increasingly' longer amount of time. That should be obvious. If someone asks you to count to 100 won't  that take MORE TIME than counting to 95?
    3. A simple query like 'SELECT AVG(age)' does NOT need to be optimized - certainly not based on any info you provided. That AVG function may be part of a larger, more compliex, query and maybe that 'other' query needs to be tuned.
    Your 'colleague' is either 'testing' you or 'playing' with you.
    If it ain't broke, don't fix it.
    The first step is to VERIFY that a problem actually exists. That means test and get PROOF that the query is taking longer than before and measure HO MUCH longer it is taking. As noted above if there is more data then a query MUST TAKE LONGER - that is a simple fact. That doesn't mean there is any tuning to be done.
    Only after you verify that a problem actually exists do you start looking for solutions.

Maybe you are looking for

  • Pagemaker line art loses quality when opened in ID

    Hi, I have a small booklet which I created some years ago in PageMaker 6.5.  Each page is 11 x 17 inches black and white.  I would like to redo some of the pages and create new ones in InDesign.  I have at this point no significant experinece working

  • My Unlimited Plan changed without my authorization!

    I went online to place an insurance claim on my phone only to discover that the insurance I have always had on all my phones with you guys is no longer on my plan. When I called to find out what was going on and why the insurance was removed I was to

  • Trial lightroom 5.2 30 day.Upgraded

    I now have two lightroom 5s in my control panel in programs each 900mb or 989 mb on the one downloaded on the date of the 30 day trial.and the other on the date of the upgrade to both or 811mb. Can i uninstall one?If so which one?The upgrade was the$

  • New Jersey Bell

    I worked for New Jersey Bell for over 5 years.  I am 65 now.  Is there a pension?

  • All my MUX 2 channels just disappeared from my BT ...

    Hi.  First post. I've had BT Vision for a year, without incident.  2 days ago, all my MUX 2 channels went.  I've done everything that the forums suggest, without result. Rebooting Rescanning (several times) Disconnecting the ariel and blank scanning