how intensive would it be if you were to do a select all querys where it matches a certain criteria, when the database gets to be 300k+? would it be easier to select by ID then? if so, how would you do so other than select where id='$id'
Your question makes no sense without any context. The amount of memory depends on what each row contains. Also, as long as you process each row without storing them all in an array in PHP, there's not a memory issue. I have scripts for TopDuels.com that run through millions of records without any issue. Rows are just handled and tossed. I don't store millions of records in memory. I read the row, get the information I need and move on to the next one. You should select just the data you need using the WHERE clause to limit the results to match whatever criteria you need. You can also use the LIMIT clause to limit the results to a subset of the all the rows that match your query. The dataset is large then find a way to process each row without having to store them all before processing the information.
alright thanks @ KalvinB, I got you If i don't store them, it'll be fine? what if i clean the array when i'm done?
^^ Again, it makes no sense to us unless we know what you're doing with the rows, and what they actually contain.