Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VARCHAR address

  • 15-03-2005 01:50AM
    #1
    Registered Users, Registered Users 2 Posts: 884 ✭✭✭


    Lads, just wondering ...... how many characters in a varchar address and is it best to increment in 8's (i.e. 48 char, 56 char) to maximise space or conserve it as the case may be ..... or am i totally wrong here.


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Try the programming forum. Its generally up to you afair though.


  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    I think it's anything from 1 to 255 bytes, depending on how you specify. At least it is in MySQL anyway. As for aligning to 8 bytes, I don't see how this would have any speed or storage advantages over just making it the exact size you need.


  • Registered Users, Registered Users 2 Posts: 884 ✭✭✭Cork Skate


    satchmo wrote:
    I think it's anything from 1 to 255 bytes, depending on how you specify. At least it is in MySQL anyway. As for aligning to 8 bytes, I don't see how this would have any speed or storage advantages over just making it the exact size you need.


    Cheers for that !!


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Cork Skate wrote:
    how many characters in a varchar address

    Do you actually mean how many in a varchar address (i.e. the information that points to where your data is stored as a varchar), or do you mean how many characters in a varchar field.
    and is it best to increment in 8's (i.e. 48 char, 56 char) to maximise space or conserve it as the case may be ..... or am i totally wrong here.
    (Suggests you're talking about fields)

    This is a Database-dependant question, and you haven't said which DB you're using.

    jc


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    He's probably talking about MySQL; think VARCHAR is basically a MySQL one. Yep, 255 is the maximum (if you need more, use TEXT or BLOB), and don't think there's any special reason to align it, though if you were doing a lot of comparisons between two fields, it might help if they were the same size.


  • Advertisement
Advertisement