SQL table no fetching?

I can access the table BUT when I use it in my query or in LEFT JOIN it just doesn’t seem to fetch any data from it!


I only have one row that holds numbers:

id int(11)

How are we supposed to give you an answer when you don’t tell us waht you did?

we’re not psychics …

@letsforum, you really need to give us more information and relevant code if you want us to help you.

SELECT * FROM `ids` as p 

left join geoname_es as l on p.`id` = l.`geonameid`

BUT it just keep on loading doesn’t fetch any data!

I mean is if no data being pulled from the table! Maybe it’s blocked some how?

Maybe I am not creating the table correctly???

  `id` INT

Are you sure there is anything IN the ids table? If you’re getting no data, that would lead me to believe the ids table is empty

iD row is full of numbers!

BUT it’s like table not responding or blocked or something wierd!

This thread probably should be in the databases section - it doesn’t seem to be a php question. I’m going to move it there, and then we will ask for more information such as the schemas for the two database tables: ids and geoname_es. (I’m assuming from your first post that your database connection is fine).

BUDDY it seems to only affect tables I create!!!

It says: Showing rows 0 - 29 ( 25,472 total, Query took 0.0650 sec)

BUT in reality was like 30min

what are you using to run the query? phpmyadmin?

Here is my query:

SELECT p.geonameid as sss

FROM temptables.osclass l

inner join temptables.`geonamemx` p on  l.name = p.asciiname

WHERE p.`feature code` NOT
IN (
'ADM1', 'ADM1H', 'ADM2', 'ADM2H', 'ADM3', 'ADM3H', 'ADM4', 'ADM4H', 'ADM5', 'ADMD', 'ADMDH', 'PCLI'
GROUP BY p.asciiname

temptables.osclass has 40k rows

temptables.geonamemx has 220k rows

I have to find rows that match and delete the rest! But it just keeps on loading foreever!!

How to speed it up please?

1 Like

please do a SHOW CREATE TABLE for both tables

thanks buddy but what is this: SHOW CREATE TABLE and how to use it with my query?

You wouldn’t use it with your query, it is a query. i.e.

SHOW CREATE TABLE your-table-name-here

is teh google broken for you? here, let me help… https://dev.mysql.com/doc/refman/5.7/en/show-create-table.html

Guys the tables are OK just need to some how make the query faster!

Please need an expert here!

can’t help you if you don’t show us the indexes on the tables

SHOW CREATE TABLE is the easiest way to do that

This is how I create the table:

CREATE TABLE geoname (
  `geonameid` INT,
  `name` varchar(200)