Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other How to setup a database table? Re: How to setup a database table?

#141095
__
Participant

that’s what I thought – if `url`, `title`, or combination are unique values, then use one, the other, or both as your PK*. You don’t need the `id` column. It’s just extra overhead to maintain.

*I’d go with both, since you’re likely to be querying for both (correct?). If you do
`PRIMARY KEY( url,title )`

and make sure you always query like
`SELECT url,title …`

(meaning, _not like_ `SELECT title,url …`), then you’ll be able to read from the index (_FAST!!!_) and never have to touch the table itself.