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 4119914
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:09:09+00:00 2026-05-20T23:09:09+00:00

I have a situation where I need to use a huge number for the

  • 0

I have a situation where I need to use a huge number for the limit. For example,

"select * from a table limit 15824293949,1";

this is….really really slow. Sometimes my home mysql server just dies.

is it possible to make it faster?

sorry the number was 15824293949, not 38975901200

Added:

**Table 'photos' (Sample)**

Photos
img_id img_filename
1       a.jpg
2       b.jpg   
3       c.jpg
4       d.jpg 
5       e.jpg
and so on
select cp1.img_id,cp2.img_id from photos as cp1 cross join photos as cp2 limit ?,1

How I get 15824293949?

I have 177901 rows in my photo table. I can get the total # of possible combinations by using

(total # of rows * total # of rows ) – total # of rows)/2

  • 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-05-20T23:09:11+00:00Added an answer on May 20, 2026 at 11:09 pm

    Try limiting the query with a WHERE clause on a column with an index on it. E.g.:

    SELECT * FROM table WHERE id >= 38975901200 LIMIT 1
    

    Update: I think perhaps you don’t even need the database? You can find the nth combination of two images by calculating something like 15824293949 / 177901 and 15824293949 % 177901. I suppose you could write a query:

    SELECT (15824293949 / 177901) AS img_id1, (15824293949 MOD 177901) AS img_id2
    

    If you’re trying to get them from the natural order that they’re in the database (and it doesn’t happen to be their img_id) then you might have some trouble. Does it matter? It’s not clear what you’re trying to do here.

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

Sidebar

Related Questions

I have this difficult situation where I need to use the CDATA tags inside
I have a situation where I need to generate a table from a stored
I have a situation where I need to retrieve records from a table and
i have a situation where i need to use GPS technique. i need to
In my view, if I have a situation where I need to use a
I have a situation where I need to use some strings temporarily but I've
I have a situation where in theory I would need to use a belongs_to_many
In my code, I have a situation where I need to copy data from
I have a situation where I need to use javax.xml library and majority of
I have a situation where I need to get a series of objects from

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.