Re: Optimizing query: select ... where id = 4 and md5(...)
В списке pgsql-general по дате отправления:
| От | Alban Hertroys |
|---|---|
| Тема | Re: Optimizing query: select ... where id = 4 and md5(...) |
| Дата | |
| Msg-id | 44A93D4E.5020808@magproductions.nl обсуждение |
| Ответ на | Optimizing query: select ... where id = 4 and md5(...) = '...' ("Alexander Farber" <alexander.farber@gmail.com>) |
| Ответы |
Re: Optimizing query: select ... where id = 4 and md5(...) = '...'
|
| Список | pgsql-general |
Alexander Farber wrote:
> I wonder, what is faster: fetching 2 columns - the
> username and the md5-result and then comparing the
> md5 string against the argument in my app, like here:
>
> punbb=> select username, md5('deadbeef' || password) from users where id
> = 4;
> username | md5
> ----------+----------------------------------
> Vasja | dcde745cc304742e26d62e683a9ecb0a
> (1 row)
Why don't you store the hashed value instead?
--
Alban Hertroys
alban@magproductions.nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера