Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.www.php > #22753

Re: [OT] Info su BIGINT, INT, etc.

From ^Bart <gabriele1NOSPAM@hotmail.com>
Newsgroups it.comp.www.php
Subject Re: [OT] Info su BIGINT, INT, etc.
Date 2019-11-01 14:22 +0100
Organization Aioe.org NNTP Server
Message-ID <qphbji$fae$1@gioia.aioe.org> (permalink)
References <qp1e4n$7sa$1@gioia.aioe.org> <u3rarepcqmnaplmpf3o02hhnv5k8cggilr@L.Serni>

Show all headers | View raw


Grazie intanto per la risposta! :)

> Non sbagli. Ma id_user è un contatore utenti, id_city è un contatore città;
> se prevedi di poter avere più di 60 città, sbagli ad usare il tipo INT.

Quindi se volessi sfruttare appieno le caratteristiche di INT UNSIGNED 
dovrei dargli invece di 60 il valore di 4294967295 giusto?

Però se uso un VARCHAR 10 su ogni record mi vengono tagliati i nomi con 
più di 10 caratteri e se uso INT 10 in teoria mi dovrebbero venire 
tagliati i numeri che superano le dieci cifre quindi potrei memorizzare 
il numero 4294967295 perché formato da dieci cifre...

> Nel caso reale, BIGINT arriva a uno stonfo di numeri e INT fino a oltre due
> miliardi, sicché il problema non si pone.
> 
> Con BIGINT puoi dare svariati ID a ogni singolo essere umano mai esistito.

Di sicuro ho capito che non mi serve usare BIGINT perché tutti quei 
valori non mi interessano e la loro memorizzazione (8 byte) avrebbe 
troppo peso.

> Leonardo

Saluti!
^Bart

Back to it.comp.www.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-10-26 14:28 +0200
  Re: [OT] Info su BIGINT, INT, etc. bramante <bramante@yopmail.com> - 2019-10-26 22:19 +0200
    Re: [OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-11-01 14:33 +0100
      Re: [OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-11-01 14:47 +0100
        Re: [OT] Info su BIGINT, INT, etc. bramante <bramante@yopmail.com> - 2019-11-01 17:18 +0100
          Re: [OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-11-02 13:29 +0100
            Re: [OT] Info su BIGINT, INT, etc. Alessandro Pellizzari <shuriken@amiran.it> - 2019-11-04 16:43 +0000
              Re: [OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-11-06 19:52 +0100
                Re: [OT] Info su BIGINT, INT, etc. Alessandro Pellizzari <shuriken@amiran.it> - 2019-11-09 10:38 +0000
  Re: [OT] Info su BIGINT, INT, etc. Leonardo Serni <lserni@gmail.com> - 2019-10-27 11:10 +0100
    Re: [OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-11-01 14:22 +0100
      Re: [OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-11-01 14:50 +0100
        Re: [OT] Info su BIGINT, INT, etc. Leonardo Serni <lserni@gmail.com> - 2019-11-04 00:02 +0100
          Re: [OT] Info su BIGINT, INT, etc. ^Bart <gabriele1NOSPAM@hotmail.com> - 2019-11-06 20:00 +0100
            Re: [OT] Info su BIGINT, INT, etc. Leonardo Serni <lserni@gmail.com> - 2019-11-08 15:56 +0100

csiph-web