SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Forums Designer
    Join Date
    Jun 2004
    Posts
    422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Show tables with huge database

    I need to list all tables from database, I know that query for it is "SHOW TABLES", but there is a big problem: there are thousands of tables and I need to get it from a script that has an execution timeout, so I need to get that list in several sessions.

    Is it possible to get list of tables in small chunks? Like tables 1-100 in one query, tables 101-200 in other query.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,323
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    sure -- just read the table names from the INFORMATION_SCHEMA database and do them in chunks (you'll need your programming language to do that, php or whatever)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    Forums Designer
    Join Date
    Jun 2004
    Posts
    422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you!

    That's exactly what I was looking for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •