Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8951247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:37:11+00:00 2026-06-15T13:37:11+00:00

I am running the following SQL query, to query my database. Query = SELECT

  • 0

I am running the following SQL query, to query my database.

Query = "SELECT TimeValue, strValue FROM tabDataRaw WHERE ID_PAR = 5 AND TimeValue >= #01/10/2012 00:21:00# AND TimeValue <= #01/10/2012 18:12:00#"

However when I run this query I get no results, the code freezes at the execute command and doesn’t return any results. Generally I see a dip in the memory being used on my PC after a couple of minutes, which I assume is the query giving up, but it never returns anything.

I decided to leave the code running overnight and I came back in the morning to a System Resource Exceeded error. I don’t understand this as I have ~1.5GB of RAM spare where this Query should return only about one thousand results. The table does hold over 13 million records but surely this shouldn’t affect the RAM needed for the query that badly, the .mdb file is less than 1GB on the drive.

Any help or advise on debugging this would be greatly appreciated.

EDIT: I have found a mistake in the Query from the Data syntax I generally use that caused me another error because I was querying for the wrong date, this Query is looking for Jan 10th rather than Oct 1st. I generally use this form to make it clearer:

Query = "SELECT TimeValue, strValue FROM tabDataRaw WHERE ID_PAR = 13 AND TimeValue >= #01 October 2012 00:21:00# AND TimeValue <= #01 October 2012 18:12:00#"

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:37:12+00:00Added an answer on June 15, 2026 at 1:37 pm

    The query is probably doing a full scan of the table. To avoid this, add a compound index on (ID_PAR, TimeValue):

    CREATE INDEX ID_PAR__TimeValue_IDX             --- choose a name for the index
      ON tabDataRaw  (ID_PAR, TimeValue) ;
    

    A (covering) index on (ID_PAR, TimeValue, strValue) would be even better in most DBMS but I’m not sure if this applies to MS-Access.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running following query. SELECT T1.C1, T2.C2..., IF( T1.C1<>T2.C1,Changed,1) AS NewColumn From T1
I am running following query.. Select T1.* from T1 LEFT JOIN T2 ON T1.C1
I am running the following query : SELECT @newNo := MAX( category_code ) FROM
I'm running the following query on my database, which generates a sql query I
In our production database, we ran the following pseudo-code SQL batch query running every
I am running following query in SQL*Plus CREATE TABLE tbl_audit_trail ( id NUMBER(11) NOT
I'm running the following query to list size and fragmentation of the indexes: SELECT
The following query runs very slow when running the sql against a SQL Server
I have database with few hundred millions of rows. I'm running the following query:
I have the following query that I am running on my database server but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.