MySQL Forums
Forum List  »  InnoDB

Re: Full Table Scans When LIMIT / OFFSET Are Used
Posted by: Peter Brawley
Date: September 22, 2021 08:09PM

Absent info on how your query relates to `tbl` DDL, I guessed what a,b,c,d in your query represent, populated `tbl` with a hundred rows of random data, and obtained this result ...

SELECT id as a, CAST(t_p_type AS signed) AS b, t_p_key as c, created_at as d
FROM tbl
WHERE dipped_at IS NULL AND t_p_key='12345'
ORDER BY a LIMIT 18446744073709551610 OFFSET 0\G

           id: 1
  select_type: SIMPLE
        table: tbl
   partitions: NULL
         type: ref
possible_keys: third_party_key
          key: third_party_key
      key_len: 1031
          ref: const,const
         rows: 1
     filtered: 100.00
        Extra: Using index condition

If that's wrong, please show the query with its actual columns.

Edited 4 time(s). Last edit at 09/23/2021 11:59AM by Peter Brawley.

Options: ReplyQuote

Written By
Re: Full Table Scans When LIMIT / OFFSET Are Used
September 22, 2021 08:09PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.