INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Endless query??

Endless query??

(OP)
Hey there,

I got a table which has around 2 millions inserts each day (which means more than 20 inserts each second). Also, this table has a timestamp field.

What will happen to this query? Will it run endlessly?

CODE --> SQL

SELECT COUNT(*)
FROM my_table
WHERE TS_FIELD > '2016-02-01 00:00:00.000000' 

Thanks for your answers!

Alex

RE: Endless query??

No. When you submit the query, Oracle notes the time and uses the (internal Oracle) timestamp on each Oracle row to determine the rows that meet your criteria.

==================================
adaptive uber info galaxies (bigger, better, faster, and more adept than cognitive innovative agile big data clouds)


RE: Endless query??

Note: this is sometimes referred to as the "Oracle snapshot".

==================================
adaptive uber info galaxies (bigger, better, faster, and more adept than cognitive innovative agile big data clouds)


RE: Endless query??

To put it simpler, when you start a select oracle will only allow the select to see the data as it was when you started the select. Also if you are querying on the TS_FIELD then make sure that it is indexed. It will greatly speed up the select.

Bill
Lead Application Developer
New York State, USA

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close