Optimal performing query for latest record for each N

前端 未结 3 1438
慢半拍i
慢半拍i 2020-12-31 05:23

Here is the scenario I find myself in.

I have a reasonably big table that I need to query the latest records from. Here is the create for the essential columns for t

3条回答
  •  再見小時候
    2020-12-31 05:32

    If your records are inserted sequentially, replacing TimeStamp in your query with ID may make a difference.

    As a side note, how many records is this returning? Your delay could be network overhead if you are getting hundreds of thousands of rows back.

提交回复
热议问题